Last active
November 21, 2022 07:32
-
-
Save shhider/fd8a5ded454f3be397a66dad9b3aa476 to your computer and use it in GitHub Desktop.
[NPM Lite Docs] #npm #litedoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update version | |
npm version patch <=> z++ | |
npm version minor <=> y++ && z=0 | |
npm version major <=> x+= && y=0 && z=0 | |
# publish | |
npm publish | |
# done! | |
# undo publish | |
npm unpublish package@version | |
# deprecate version | |
npm deprecate package@"< x.y.z" "warning message" | |
# npm owner | |
npm owner ls <package name> | |
npm owner add <user> <package name> | |
npm owner rm <user> <package name> | |
npm adduser | |
npm login | |
npm whoami |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show package version history | |
npm view [packagename] versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "commonjs | module", // 指定使用哪种模块方案,默认是`commonjs` | |
// 入口文件 | |
"main": "./path", // 面向 CommonJS 的入口配置。适用于 Server 端。 | |
"module": "./path", // 面向 ES Module 的入口配置。适用于 Server 和 Web 端。 | |
"browser": "./path", // 面向 Web 端打包时,需要配置 browser 入口 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment