// assign the module to a local variablevar header = require('gulp-header');// literal string// NOTE: a line separator will not be added automaticallygulp.src('./foo/*.js') .pipe(header('Hello')) .pipe(gulp.dest('./dist/'))// ejs style templatinggulp.src('./foo/*.js') .pipe(header('Hello <%= name %>\n', { name : 'World'} )) .pipe(gulp.dest('./dist/'))
Issues and Alerts
My handle on twitter is @tracker1 - If there is an urgent issue, I get twitter notifications sent to my phone.
API
header(text, data)
text
Type: String
Default: ''
The template text.
data
Type: Object
Default: {}
The data object used to populate the text.
In addition to the passed in data, file will be the stream object for the file being templated against and filename will be the path relative from the stream's basepath.
NOTE: using false will disable template processing of the header
yocontra
yo@contra.io
// ES6-style template string
gulp.src('./foo/*.js')
.pipe(header('Hello ${name}\n', { name : 'World'} ))