Open marcobarbosa opened 9 years ago
Hi,
I have similar problem with 'gulp-compile-handlebars'
return gulp.src(hbsWild)
.pipe(data(function(file) {
var fileObject = path.parse(file.path);
var filePath = fileObject.dir + '/' + fileObject.name + '.json';
return (fs.existsSync(filePath)) ? require(filePath) : {};
}))
.pipe(handlebars(templateData, options))
.pipe(rename({extname: ".html"}))
.pipe(gulp.dest('src'));
Removing data plugin will get it work as expected.
I'll play around with this tonight. Sorry for the delay.
Hi,
I'm having issues where the
gulp-data
plugin is not giving me compilation errors.Please see my compile-jade task below.
If I run
gulp compile-jade
I simply get the "task finished" in the terminal. Runningjade <template>
manually in the terminal gives me the syntax error that I want.If I remove the plugins.data pipe part, then running
gulp compile-jade
again will give me the correct syntax errors. So I'm wondering, what is wrong with the require above? Why is it making jade not give me errors?Everything will work fine without any syntax error (including the data being passed).
Can you spot any errors with this approach?