Adding task to copy unprocessed files to build directory

This commit is contained in:
Jeff Avallone 2014-11-23 16:29:40 -05:00
parent 0e77b0f96b
commit 55f03879a7
3 changed files with 11 additions and 1 deletions

View File

@ -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' }))

3
src/css/test.css Normal file
View File

@ -0,0 +1,3 @@
h1 {
color: #fff;
}

View File

@ -3,6 +3,7 @@
<head>
<title>Demo</title>
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/test.css" />
</head>
<body>
${ contents }