From 342cf8d5bbea006ee4b2b27246313dd481ec67a3 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sun, 23 Nov 2014 12:00:07 -0500 Subject: [PATCH] Adding task to build pages wrapped in a template --- .gitignore | 1 + gulpfile.js | 9 ++++++++- package.json | 3 ++- src/index.html | 1 + template.html | 9 +++++++++ 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/index.html create mode 100644 template.html diff --git a/.gitignore b/.gitignore index 3c3629e..dd87e2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +build diff --git a/gulpfile.js b/gulpfile.js index 25189f2..605e4b0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,5 +1,12 @@ -var gulp = require('gulp'); +var gulp = require('gulp'), + wrap = require('gulp-wrap'); gulp.task('default', function() { console.log('Default task'); }); + +gulp.task('markup', function() { + return gulp.src('./src/**/*.html') + .pipe(wrap({ src: './template.html' })) + .pipe(gulp.dest('./build')) +}); diff --git a/package.json b/package.json index f2b6757..062b70f 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "license": "MIT", "private": true, "devDependencies": { - "gulp": "^3.8.10" + "gulp": "^3.8.10", + "gulp-wrap": "^0.5.0" } } diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..b874e49 --- /dev/null +++ b/src/index.html @@ -0,0 +1 @@ +

Demo page

diff --git a/template.html b/template.html new file mode 100644 index 0000000..9f1af64 --- /dev/null +++ b/template.html @@ -0,0 +1,9 @@ + + + + Demo + + + ${ contents } + +