jonkemp/gulp-useref

additionalStreams not working

Open

#200 aberto em 6 de abr. de 2016

Ver no GitHub
 (16 comments) (0 reactions) (0 assignees)JavaScript (97 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (717 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Given the below code, which I've simplified to make more readable:

gulp.task('build', function() {
  var templateStream = gulp.src('src/**/!(index).html')
    .pipe(processTemplates()) // lazypipe that just calls gulp-angular-templatecache.

  return gulp.src('src/index.html')
    .pipe(addTemplateToIndex()) // Adds <script> reference to 'app/app.templates.js'.
    .pipe($.useref({
      additionalStreams: [templateStream]
    }))
    .pipe($.if('app/**/*.js', processOwnJs()))
    .pipe($.if('*.js', processAllJs()))
    .pipe($.if('*.html', processAllHtml()))
    .pipe(gulp.dest('dist'));
});

I'm getting a File not found with singular glob error, specifying the full absolute path of the 'app/app.templates.js' file.

I can't seem to figure out what exactly is going wrong; through inserting a few calls to gulp-debug I can see that the app.templates.js file appears to be getting passed along with the expected cwd, base and path properties.

Guia do colaborador