tambourinecoder / gulp-jst-concat

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

windows path support #3

Open sofuxro opened 9 years ago

sofuxro commented 9 years ago

I've wasted one hour on this issue. Please added it into the doc example. The issue is with windows path 'client\app\views\bar\baz.jade'

var jstConcat = require('gulp-jst-concat'),
     slash    = require('gulp-slash');

gulp.task('JST', function () {
    gulp.src('client/app/views/**/*.html')
      .pipe(slash())
      .pipe(jstConcat('jst.js', {
          renameKeys: ['^.*views/(.*).html$', '$1']
      }))
      .pipe(gulp.dest('public/assets'))
})

OR even better you could use https://www.npmjs.org/package/slash (or something similar) inside and make it cross OS compatible.

Thanks for the gulp plugin :D