Jude
Jude

Reputation: 1

gulp-useref is ignoring files if there are more than 25 files

I'm using generator-gulp-webapp and have 27 html files compiled to the .tmp folder. I found only the first 25 html files will be process and pass to the dist folder during the gulp-useref task. Here's the gulpfile.coffee's code, really need to know how to fix this, thanks.

gulp.task 'views', ->
  gulp.src [
      '!app/mixins/**/*.jade'
      '!app/layouts/**/*.jade'
      '!app/partials/**/*.jade'
      'app/**/*.jade'
    ], base: 'app'
    .pipe $.data (file) ->
      return JSON.parse fs.readFileSync '.tmp/data.json'
    .pipe $.jade
      pretty: true
      basedir: 'app/'
      compileDebug: true
    .on 'error', (err) ->
      $.notify
        title: 'Jade compile failed.',
        sound: 'Sosumi'
      .write err.message
    .pipe gulp.dest '.tmp'

gulp.task 'htmlProcess', ['views', 'styles', 'scripts', 'compass'], ->
  assets = $.useref.assets
    searchPath: ['.tmp', 'app', '.']

  gulp.src ['app/**/*.html', '.tmp/**/*.html']
    .pipe assets
    .pipe assets.restore()
    .pipe $.useref()
    .pipe gulp.dest 'dist'

Upvotes: 0

Views: 393

Answers (1)

jonkemp
jonkemp

Reputation: 86

I was able to get a working test case to replicate this issue. I believe I have found a fix for this. Check out the most current version of the repo or wait for the next version to be published on npm.

https://www.npmjs.com/package/gulp-useref

Upvotes: 0

Related Questions