From 55f03879a74258bf583540ef4b74c9c7ce0d93b5 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sun, 23 Nov 2014 16:29:40 -0500 Subject: [PATCH] Adding task to copy unprocessed files to build directory --- gulpfile.js | 8 +++++++- src/css/test.css | 3 +++ template.html | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/css/test.css 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 }