How to use a npm postinstall script with bob? #405
Unanswered
teodorciuraru
asked this question in
Q&A
Replies: 1 comment
-
The postinstall script is executed by yarn/npm. Bob cannot change the current directory. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to execute a custom script after my package had installed. I'm doing this by settings a
"postinstall": "node my-script.sh"
in package.json. However, when runningbob build
, the script is executed and the wrong current working directory is loaded (the directory containing the package, not the example app's)How can I use
bob
with npm scripts so that my scripts will be run from inside the example app, not the package folder. Also, I need to make sure the solution will continue to let the package run the postinstall scripts well even after releasing to npm.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions