Adding task to build pages wrapped in a template

This commit is contained in:
Jeff Avallone
2014-11-23 12:00:07 -05:00
parent c898f7b5ec
commit 342cf8d5bb
5 changed files with 21 additions and 2 deletions
+1
View File
@@ -1 +1,2 @@
node_modules node_modules
build
+8 -1
View File
@@ -1,5 +1,12 @@
var gulp = require('gulp'); var gulp = require('gulp'),
wrap = require('gulp-wrap');
gulp.task('default', function() { gulp.task('default', function() {
console.log('Default task'); console.log('Default task');
}); });
gulp.task('markup', function() {
return gulp.src('./src/**/*.html')
.pipe(wrap({ src: './template.html' }))
.pipe(gulp.dest('./build'))
});
+2 -1
View File
@@ -10,6 +10,7 @@
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"gulp": "^3.8.10" "gulp": "^3.8.10",
"gulp-wrap": "^0.5.0"
} }
} }
+1
View File
@@ -0,0 +1 @@
<h1>Demo page</h1>
+9
View File
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
</head>
<body>
${ contents }
</body>
</html>