tambourinecoder / gulp-jst-concat

Compile underscore / lodash view templates to a single JST file
MIT License
11 stars 11 forks source link

Ability to set custom namespace for templates #8

Closed sethkrasnianski closed 5 years ago

sethkrasnianski commented 9 years ago

This is for those who don't want their templates exposed as JST to window. For example:

  return gulp.src(config.jade.templates.src)
    .pipe($.jade())
    .pipe($.jstConcat('templates.js', {
      renameKeys: ['^.*views/templates/(.*).html$', '$1'],
      namespace: 'mySweetTemplates' // exposes templates to window as mySweetTemplates
    }))
    ...