I'm trying to split off a portion of my code into it's own local module, but keeping it in the same path. I followed https://medium.com/@arnaudrinquin/build-modular-application-with-npm-local-modules-dfc5ff047bcc including
"preinstall": "rm-local-modules",
Which works in npm@5+
However, his instructions do not specify how to trigger the npm install in the local module. In the package.json of the local module I have
"prepare": "tsc"
Right now I execute it via script to generate the dist folder, but I was wondering if there is a cleaner way to do that. Ideally with a devDependency that does it.
"prepare": "rm -rf node_modules/@devhaus && cd local_packages/@devhaus/react-auth-provider && npm ci",
And this works with npm install and npm ci