I'd like npm install to only add the compiled files of a project hosted in a private repository on Github. So here is the relevant part of what I did in my package.json
"scripts": {
"prepare": "npm run build",
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public --dev",
"prettify": "prettier --write --list-different .",
"lint": "eslint --fix ."
},
...
"files": [
"public/build/",
"**/*.md"
]
Then I just npm install --omit=dev github:name/personnal-project#feat/test. Everything got installed as expected BUT it turns out devDependencies are also installed. The thing is they are totally useless to the user adding the project to production (it's just tools for code quality, like eslint).
From the NPM documentation, I can see that:
As with regular git dependencies, dependencies and devDependencies will be installed if the package has a prepare script before the package is done installing.
How can I prevent this behaviour and just install Dependencies ? Publishing a private package on npm or github's registries is not an option for me. And I did not had any success installing binaries from a Github release hosted in a private repo.
Thanks for your help!