Adding server with LiveReload support
This commit is contained in:
parent
342cf8d5bb
commit
5a99aaa571
13
gulpfile.js
13
gulpfile.js
@ -1,10 +1,21 @@
|
||||
var gulp = require('gulp'),
|
||||
wrap = require('gulp-wrap');
|
||||
wrap = require('gulp-wrap'),
|
||||
connect = require('gulp-connect'),
|
||||
watch = require('gulp-watch');
|
||||
|
||||
gulp.task('default', function() {
|
||||
console.log('Default task');
|
||||
});
|
||||
|
||||
gulp.task('server', function() {
|
||||
watch('./build/**/*', { name: 'Server' })
|
||||
.pipe(connect.reload());
|
||||
return connect.server({
|
||||
root: './build',
|
||||
livereload: true
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('markup', function() {
|
||||
return gulp.src('./src/**/*.html')
|
||||
.pipe(wrap({ src: './template.html' }))
|
||||
|
@ -11,6 +11,8 @@
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.10",
|
||||
"gulp-connect": "^2.2.0",
|
||||
"gulp-watch": "^2.0.0",
|
||||
"gulp-wrap": "^0.5.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user