Skip to content

Instantly share code, notes, and snippets.

@AllenFang
Created July 16, 2018 08:00
Show Gist options
  • Save AllenFang/58f51ba397f1df4b5104d279d918a2fb to your computer and use it in GitHub Desktop.
Save AllenFang/58f51ba397f1df4b5104d279d918a2fb to your computer and use it in GitHub Desktop.
import gulpJsonTransform from 'gulp-json-transform';
function patchChunks() {
return gulp.src(path.resolve(config.output.path, 'manifest.json'))
.pipe(gulpJsonTransform((data) => {
data.background.scripts = ...
data.content_scripts = ....
// ...
return data;
}))
.pipe(gulp.dest(config.output.path));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment