Adding task to copy unprocessed files to build directory
This commit is contained in:
parent
0e77b0f96b
commit
55f03879a7
@ -5,11 +5,12 @@ var gulp = require('gulp'),
|
|||||||
compass = require('gulp-compass');
|
compass = require('gulp-compass');
|
||||||
|
|
||||||
gulp.task('default', ['server'], function() {
|
gulp.task('default', ['server'], function() {
|
||||||
|
gulp.watch('./src/**/*.!(html|scss)', ['static']);
|
||||||
gulp.watch(['./src/**/*.html', './template.html'], ['markup']);
|
gulp.watch(['./src/**/*.html', './template.html'], ['markup']);
|
||||||
gulp.watch('./src/**/*.scss', ['compass']);
|
gulp.watch('./src/**/*.scss', ['compass']);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('server', ['markup', 'compass'], function() {
|
gulp.task('server', ['static', 'markup', 'compass'], function() {
|
||||||
watch('./build/**/*', { name: 'Server' })
|
watch('./build/**/*', { name: 'Server' })
|
||||||
.pipe(connect.reload());
|
.pipe(connect.reload());
|
||||||
return connect.server({
|
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() {
|
gulp.task('markup', function() {
|
||||||
return gulp.src('./src/**/*.html')
|
return gulp.src('./src/**/*.html')
|
||||||
.pipe(wrap({ src: './template.html' }))
|
.pipe(wrap({ src: './template.html' }))
|
||||||
|
3
src/css/test.css
Normal file
3
src/css/test.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
h1 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Demo</title>
|
<title>Demo</title>
|
||||||
<link rel="stylesheet" href="/css/main.css" />
|
<link rel="stylesheet" href="/css/main.css" />
|
||||||
|
<link rel="stylesheet" href="/css/test.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
${ contents }
|
${ contents }
|
||||||
|
Loading…
Reference in New Issue
Block a user