We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ "name": "myoursky-npm-pkg", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" }
name: 发布的项目名称
version: 发布的版本
注意: 每次更新代码并发布时需要更新发布版本。此处有一个原则需要遵守。
main: 入口文件
此处如果设置了淘宝npm镜像,需要先切回原来的registry。 https://registry.npmjs.org/,不然会默认将user加到淘宝镜像上, 加完之后再切回淘宝镜像。此时为了让项目正常发布,需要在package.json中添加如下配置
https://registry.npmjs.org/
"publishConfig": { "registry": "https://registry.npmjs.org/" }
发布成功!
npm unpublish [email protected]
发布时如果需要忽略特定文件,则通过将文件名称添加到.npmignore中实现。
.npmignore
The text was updated successfully, but these errors were encountered:
No branches or pull requests
npm publish(npm发布项目)
package.json简单分析
name: 发布的项目名称
version: 发布的版本
注意: 每次更新代码并发布时需要更新发布版本。此处有一个原则需要遵守。
main: 入口文件
发布
npm adduser
此处如果设置了淘宝npm镜像,需要先切回原来的registry。
https://registry.npmjs.org/
,不然会默认将user加到淘宝镜像上,加完之后再切回淘宝镜像。此时为了让项目正常发布,需要在package.json中添加如下配置
npm publish
发布成功!
npm unpublish
npm unpublish [email protected]
npm publish ignore
发布时如果需要忽略特定文件,则通过将文件名称添加到
.npmignore
中实现。The text was updated successfully, but these errors were encountered: