Introduce separate serve:browsersync task (fixes #299)
parent
6f244cdcd9
commit
869e968a3b
17
gulpfile.js
17
gulpfile.js
|
@ -335,7 +335,7 @@ gulp.task('assets', function () {
|
||||||
/**
|
/**
|
||||||
* Serves the landing page from "out" directory.
|
* Serves the landing page from "out" directory.
|
||||||
*/
|
*/
|
||||||
gulp.task('serve', ['default'], function () {
|
gulp.task('serve:browsersync', ['default'], function () {
|
||||||
browserSync({
|
browserSync({
|
||||||
notify: false,
|
notify: false,
|
||||||
server: {
|
server: {
|
||||||
|
@ -352,6 +352,21 @@ gulp.task('serve', ['default'], function () {
|
||||||
gulp.watch(['docs/**/*'], ['pages', 'assets', reload]);
|
gulp.watch(['docs/**/*'], ['pages', 'assets', reload]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('serve', ['default'], function() {
|
||||||
|
$.connect.server({
|
||||||
|
root: 'dist',
|
||||||
|
livereload: true
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.watch(['src/**/*.js', '!src/**/README.md'],
|
||||||
|
['scripts', 'demos', 'components']);
|
||||||
|
gulp.watch(['src/**/*.{scss,css}'], ['styles', 'demos']);
|
||||||
|
gulp.watch(['src/**/*.html'], ['demos']);
|
||||||
|
gulp.watch(['src/**/README.md'], ['components']);
|
||||||
|
gulp.watch(['templates/**/*'], ['templates']);
|
||||||
|
gulp.watch(['docs/**/*'], ['pages', 'assets']);
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('publish', function(cb) {
|
gulp.task('publish', function(cb) {
|
||||||
runSequence('default',
|
runSequence('default',
|
||||||
['templates', 'assets', 'pages', 'demos'],
|
['templates', 'assets', 'pages', 'demos'],
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
"gulp-cache": "^0.2.6",
|
"gulp-cache": "^0.2.6",
|
||||||
"gulp-changed": "^1.0.0",
|
"gulp-changed": "^1.0.0",
|
||||||
"gulp-concat": "^2.4.1",
|
"gulp-concat": "^2.4.1",
|
||||||
|
"gulp-connect": "^2.2.0",
|
||||||
"gulp-css-inline-images": "^0.1.1",
|
"gulp-css-inline-images": "^0.1.1",
|
||||||
"gulp-csso": "^1.0.0",
|
"gulp-csso": "^1.0.0",
|
||||||
"gulp-flatten": "0.0.4",
|
"gulp-flatten": "0.0.4",
|
||||||
|
|
Loading…
Reference in New Issue