Commit 67a5dae4 authored by Stanislav Ivanov's avatar Stanislav Ivanov Committed by Vadim Makeev

Add dev server and watcher for development

parent 67149189
...@@ -8,6 +8,7 @@ const rsync = require('gulp-rsync'); ...@@ -8,6 +8,7 @@ const rsync = require('gulp-rsync');
const sequence = require('run-sequence'); const sequence = require('run-sequence');
const zip = require('gulp-zip'); const zip = require('gulp-zip');
const pages = require('gulp-gh-pages'); const pages = require('gulp-gh-pages');
const browserSync = require('browser-sync').create();
gulp.task('prepare', () => { gulp.task('prepare', () => {
...@@ -100,4 +101,18 @@ gulp.task('clean', () => { ...@@ -100,4 +101,18 @@ gulp.task('clean', () => {
return del('prepared/**'); return del('prepared/**');
}); });
gulp.task('default', ['prepare']); gulp.task('serve', () => {
browserSync.init({
ui: false,
notify: false,
port: 3000,
server: {
baseDir: '.'
}
});
gulp.watch('index.html').on('change', () => {
browserSync.reload();
});
});
gulp.task('default', ['serve']);
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
"shower-ribbon": "^2.0.10" "shower-ribbon": "^2.0.10"
}, },
"devDependencies": { "devDependencies": {
"browser-sync": "^2.18.12",
"del": "^2.2.1", "del": "^2.2.1",
"fs": "0.0.2", "fs": "0.0.2",
"gulp": "^3.9.1", "gulp": "^3.9.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment