How to use gulp-template.precompile:
GitHub: bcgov/met-formio
6 7 8 9 10 11 12 13 14 15
// Compile all *.ejs files to pre-compiled templates and append *.js to the filename. gulp.task('templates', () => gulp .src('./src/**/*.ejs') .pipe( template.precompile({ evaluate: /\{%([\s\S]+?)%\}/g, interpolate: /\{\{([\s\S]+?)\}\}/g, escape: /\{\{\{([\s\S]+?)\}\}\}/g, variable: 'ctx',