Adding task to build pages wrapped in a template
This commit is contained in:
@@ -1 +1,2 @@
|
||||
node_modules
|
||||
build
|
||||
|
||||
+8
-1
@@ -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'))
|
||||
});
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.10"
|
||||
"gulp": "^3.8.10",
|
||||
"gulp-wrap": "^0.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<h1>Demo page</h1>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Demo</title>
|
||||
</head>
|
||||
<body>
|
||||
${ contents }
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user