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