Open eneuhauser opened 9 years ago
Using gulp-replace, the following fixes the trailing quote until the suffix issue can be worked out.
gulp.task('schema', function() {
return gulp.src(['**/*.schema.json'])
.pipe(fileinclude({
prefix: '"@@',
//suffix: '"',
basepath: '@file',
filters: {
indent: indent
}
}))
.pipe(replace('}"', '}'))
.pipe(gulp.dest('./dist/'));
});
When I include a suffix and filters, I get the following error. This error occurs regardless if I apply the filter.
For my case, I'm including a file inside JSON, so I wrap the file include inside quotes to make it valid JSON. Here's the snippet with the include:
My task looks like this:
If I comment out suffix, it works, but leaves a trailing quote. If I comment out the filters, it works, but doesn't apply the indent.