Replies: 1 comment 1 reply
-
|
The best practice is to build prepublish, and not to inflict a build step on every consumer of your package. When would you want |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I put
preparescripts in my projects so that if they are installed as git dependencies in other projects, thenpreparewill build things as needed.However, when I run
npm installin a project, I wantprepareto run only for dependencies that I've installed into my project, and not for the project itself.Is this possible?
If not, I maybe it would be good feature to add. A good reason for adding such a feature is that running
npm installonly for it to fail because the project is in a broken state is annoying. Sometimes, you just need to install things in the process of getting the project working again.We can open
package.jsonand temporarily remove thepreparescript as a workaround. It would be nicer though, if I could stick something in my project's.npmrcand never have to do that again (only when runningnpm installdirectly in the project, but thepreparescript should still always run when it is installed as a git dependency for example).Beta Was this translation helpful? Give feedback.
All reactions