1.0.7 • Published 9 months ago
@clonegod/ttd-chain-common v1.0.7
ttd-chain-common
发布 package 步骤
注册账户
npm adduser
按提示输入:用户名、密码、邮箱
登录
npm login
发布
npm publish --access=public
确认package.json中的 name
字段是唯一的。npm不允许重复的包名。如果包名已被占用,需要更新1个新的名字。
搜索不到包的问题:
The npm website takes time to show the latest packages or package versions because of the delays in CDN, website cache etc.
But it will show up eventually. Meanwhile, you can check for the package with:
npm show <package-name>
This will output all the versions of the package as well so you can be confident that the package exists or the latest version is published.
使用
npm install ttd-chain-common
npm install ttd-chain-common@1.0.0
成功发布后,在其它项目中,通过 npm install your-pacakge-name
来安装使用。
更新
npm publish --access=public
如果需要对包进行更新,只需要在 package.json 中更新 version
字段,然后再次运行发布