Compile client-side Jade templates using Gulpjs
问题 I'm trying to compile all my .jade templates into a single js file, I'm using Gulpjs and gulp-jade, gulp-concat.. I can get the single file but the problem is that all the functions rendered there have the same name, they are all called "template". foo.jade: .fooDiv h1 Foo here foo2.jade: .foo2Div h1 Foo2 here Gulp file: gulp.src("templates/**/*.jade") .pipe(jade({client: true})) .pipe(concat("templates.js")) .pipe(gulp.dest("../website/templates")) That would output a file like this: