np
np copied to clipboard
Standardizing package.json "np.contents" publish dir
Following on from the discussion at Node.js core from https://github.com/nodejs/node/issues/14970#issuecomment-482996427, I'm wondering if it's worth trying to standardize this publishing feature to apply to other publish tools as well.
How about a standard package.json field for directories.publish:
{
"directories": {
"publish": "dist"
}
}
@sindresorhus would you be open to supporting something like this?
Would be interesting to see if we could get buy-in from package managers too.
Sounds like a good idea if you get buy-in from other tools. Personally, I'm not using the --contents
flag though, so would be better to involve some people that do use it: @willmendesneto @MarcusNoble @Jaid
If installing a dependency from a git repository, would the "publish": "dist"
option install the dist folder after running the prepare
step, rather than installing the root folder?
And how would npm link
workflow work? Would running npm link
at the root of the project do the right thing, and cause NPM to link to the dist
folder, not the root (and handle node_modules properly too)?
Oh, I just realized this was in np
repo. I'd like for this to be baked into NPM.
Closing due to age and lack of interest