diff --git a/gulpfile.js b/gulpfile.js index 4650994..6825609 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,11 +5,12 @@ var gulp = require('gulp'), compass = require('gulp-compass'); gulp.task('default', ['server'], function() { + gulp.watch('./src/**/*.!(html|scss)', ['static']); gulp.watch(['./src/**/*.html', './template.html'], ['markup']); gulp.watch('./src/**/*.scss', ['compass']); }); -gulp.task('server', ['markup', 'compass'], function() { +gulp.task('server', ['static', 'markup', 'compass'], function() { watch('./build/**/*', { name: 'Server' }) .pipe(connect.reload()); return connect.server({ @@ -18,6 +19,11 @@ gulp.task('server', ['markup', 'compass'], function() { }); }); +gulp.task('static', function() { + return gulp.src('./src/**/*.!(html|scss)') + .pipe(gulp.dest('./build')); +}); + gulp.task('markup', function() { return gulp.src('./src/**/*.html') .pipe(wrap({ src: './template.html' })) diff --git a/src/css/test.css b/src/css/test.css new file mode 100644 index 0000000..97dfbea --- /dev/null +++ b/src/css/test.css @@ -0,0 +1,3 @@ +h1 { + color: #fff; +} diff --git a/template.html b/template.html index 6ea5e3a..1aa71eb 100644 --- a/template.html +++ b/template.html @@ -3,6 +3,7 @@ Demo + ${ contents }