Adding server with LiveReload support

This commit is contained in:
Jeff Avallone 2014-11-23 12:24:03 -05:00
parent 342cf8d5bb
commit 5a99aaa571
2 changed files with 14 additions and 1 deletions

View File

@ -1,10 +1,21 @@
var gulp = require('gulp'), var gulp = require('gulp'),
wrap = require('gulp-wrap'); wrap = require('gulp-wrap'),
connect = require('gulp-connect'),
watch = require('gulp-watch');
gulp.task('default', function() { gulp.task('default', function() {
console.log('Default task'); 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() { gulp.task('markup', function() {
return gulp.src('./src/**/*.html') return gulp.src('./src/**/*.html')
.pipe(wrap({ src: './template.html' })) .pipe(wrap({ src: './template.html' }))

View File

@ -11,6 +11,8 @@
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"gulp": "^3.8.10", "gulp": "^3.8.10",
"gulp-connect": "^2.2.0",
"gulp-watch": "^2.0.0",
"gulp-wrap": "^0.5.0" "gulp-wrap": "^0.5.0"
} }
} }