react-native-builder-bob
react-native-builder-bob copied to clipboard
How to use a npm postinstall script with bob?
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 running bob 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!
The postinstall script is executed by yarn/npm. Bob cannot change the current directory.