Skip to content

Commit

Permalink
Remove postinstall from package.json with custom Yarn plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Feb 3, 2022
1 parent 398685c commit 11901dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .yarn/plugins/plugin-remove-postinstall.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
name: 'plugin-remove-postinstall',
factory: () => ({
hooks: {
beforeWorkspacePacking(workspace, rawManifest) {
delete rawManifest.scripts.postinstall;
},
},
}),
};
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/plugin-remove-postinstall.cjs

yarnPath: .yarn/releases/yarn-3.1.0.cjs

0 comments on commit 11901dd

Please sign in to comment.