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

No replace in json files

Open aclayton opened this issue 8 years ago • 4 comments

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'));
});

aclayton avatar Jun 09 '17 15:06 aclayton

Same problem

auban avatar Mar 27 '18 23:03 auban

+1

simondib avatar Apr 27 '18 22:04 simondib

+1

lipichang avatar Jun 07 '18 01:06 lipichang

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.

TheDancingCode avatar Jun 07 '18 16:06 TheDancingCode