NPM |
Yarn |
说明 |
---|---|---|
npm init |
yarn init |
初始化某个项目 |
npm install/link |
yarn install/link |
默认安装依赖 |
npm install taco –save |
yarn add taco |
安装某个依赖并默认保存到package |
npm uninstall taco –save |
yarn remove taco |
移除某个依赖 |
npm install taco –save -dev |
yarn add taco -dev |
安装某个开发时的依赖 |
npm update taco –save |
yarn upgrade taco |
更新某个依赖项目 |
npm install taco –global |
yarn global add taco |
安装某个全局依赖项目 |
npm publish/login/logout |
yarn publish/login/logout |
发布/登录/退出 |
npm run/test |
yarn run/test |
运行某个命令 |
本文由我的自留地作者:demo原创,转载请注明出处来自https://demo.gihut.com/2571.html