We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to try to load the json file and if it doesnt exists just ignore and keep going.
Advice?
The text was updated successfully, but these errors were encountered:
Try this...
gulp.task('json-test', function() { return gulp.src('./examples/test1.html') .pipe(data(function(file) { var path = './examples/' + path.basename(file.path) + '.json'; return (fs.existsSync(path)) ? require(path) : {}; })) .pipe(swig()) .pipe(gulp.dest('build')); });
Sorry, something went wrong.
No branches or pull requests
I want to try to load the json file and if it doesnt exists just ignore and keep going.
Advice?
The text was updated successfully, but these errors were encountered: