简体   繁体   中英

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'

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM