gulp-rev-replace icon indicating copy to clipboard operation
gulp-rev-replace copied to clipboard

replacing same reference more then one times

Open cbfranca opened this issue 8 years ago • 1 comments

// Rewrite references to file names which have been renamed by gulp-rev-all
gulp.task('fingerprintReplace', ['fingerprintGenerate'], () => {

  if (config.production) {

    // We only need file name without directories
    const stripDirectories = function (filename) {
      return filename.split('/').slice(0).pop();
    };


    return gulp.src([config.folder.build + '**/*', '!' + config.folder.build + 'rev-manifest.json'])      
      .pipe(revReplace({
        manifest: gulp.src(config.folder.build + 'rev-manifest.json'),
        modifyUnreved: stripDirectories,
        modifyReved: stripDirectories
      }))
      .pipe(gulp.dest(config.folder.build))
      .pipe(size({
        title: 'dist size'
      }));
  }

});

Print 01 - Console Errors Print 02 - Manifest.json

Obs: Only occurs in some files

cbfranca avatar Sep 20 '17 21:09 cbfranca

Did you find a solution to this?

tj-kev avatar Jan 29 '18 15:01 tj-kev