jamesknelson / gulp-rev-replace

Rewrite occurences of filenames which have been renamed by gulp-rev
MIT License
389 stars 62 forks source link

No replace in json files #74

Open aclayton opened 7 years ago

aclayton commented 7 years ago

gulp-rev-replace doesn't seem to be accepting .json files, even when adding 'json' to the replaceInExtensions options. This is to support versioning of pwa manifest.json files.

Paths check out (via console) see my gulp task below.

gulp.task('revReplaceManifest', function() {

  console.log('REV Manifest: ', `${paths.dist}/${paths.client.revManifest}`);
  console.log('PWA Manifest: ', 'dist/client/manifest.json');

  return gulp.src('dist/client/manifest.json')
      .pipe(plugins.revReplace({
        replaceInExtensions: ['.json'],
        manifest: gulp.src(`${paths.dist}/${paths.client.revManifest}`)
      }))
      .pipe(gulp.dest('dist/client'));
});
auban commented 6 years ago

Same problem

simondib commented 6 years ago

+1

lipichang commented 6 years ago

+1

TheDancingCode commented 6 years ago

Could any of you set up a small repo with the bare minimum to reproduce the problem? In all of the cases I've tried, replacement in JSON files seems to work just fine.