Closed icai closed 6 years ago
https://github.com/zimmen/gulp-twig/blob/004763d9b581be9b6e13290a37622a891c9a1b80/index.js#L16
gulp.src(['./views/**/*.html']) .pipe(twig({ base: './views/', data: { tilte: 'sss'} // data }))
if I use the variable in one template, like this
{% set title = 'register' %}
ALL Template would be has data.title while equal to 'register'
https://www.npmjs.com/package/map-stream
change to
var data = file.data || Object.assign({}, options.data) || {};
The fix for this in #45 is working, please take a look @zimmen
https://github.com/zimmen/gulp-twig/releases/tag/v1.2.0
https://github.com/zimmen/gulp-twig/blob/004763d9b581be9b6e13290a37622a891c9a1b80/index.js#L16
if I use the variable in one template, like this
ALL Template would be has data.title while equal to 'register'
https://www.npmjs.com/package/map-stream
change to