Open kud opened 9 years ago
I'm not sure how I could fix it as I can't make npm prune
aware of my library. Any ideas?
We could give a alias to the user to override prune
or create another script with prune-with-napa
.
Hmm interesting. I wonder if we'd be opening pandora's box by beginning to wrap npm
commands to be napa
aware? napa prune
? Or really napa xxxx
just aliases down to the npm command and does special handling for the commands it needs to. Hmm...
The thing is it's not a prune on napa, it's just to make npm aware there're napa packages.
It looks like if you add the package to bundledDependencies
it will not prune the package. For example:
"bundledDependencies": [
"ember", "handlebars", "jquery"
]
So maybe when installing, napa
should add the packages to that key to help with this flow?
The bundledDependencies
solution didn't work for me, and, with this change, attempting to uninstall a package after npm had removed the extra folders caused npm to give the warning:
npm ERR! code E404
npm ERR! 404 Not Found: sphinxbase@*
When you do npm prune, it removes packages installed by napa. It's a nonsense as it's defined in napa key in package.json.
It sounds logical though about npm but a fix should be done.
What do you think?