cli
cli copied to clipboard
[DOCS] How to specify a <package-spec> for the `prepare` script to match `publish`.
Is there an existing issue for this?
- [X] I have searched the existing issues
This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
- [X] This is a CLI Docs Enhancement.
Description of Problem
The npm publish command allows for a <package-spec> parameter so that you could, for example npm publish ./dist.
This works fine for directly publishing to npm: npm install <pkg> installs the dist folder as the package into your node_modules.
On the other hand, if you use npm install github:me/repo, it isn't clear how to let npm know that the ./dist folder is what should be installed after the prepare script is run.
Potential Solution
I don't know. The only thing I can think of is maybe using workspace, but it isn't clear how that would interact when the ./dist package has the same name as the root source package.
Docs URL
docs/content/commands/npm-install.md