diff --git a/gulpfile.js b/gulpfile.js index 605e4b0..7d29877 100644 --- a/gulpfile.js +++ b/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' })) diff --git a/package.json b/package.json index 062b70f..9e4ae6e 100644 --- a/package.json +++ b/package.json @@ -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" } }