本文共 494 字,大约阅读时间需要 1 分钟。
| 命令 | 对应命令 | 说明 |
|---|---|---|
| npm init | yarn init | 创建一个项目,初始化项目结构 |
| npm install/link | yarn install/link | 安装项目依赖,链接到本地节点模块 |
| npm install taco —save | yarn add taco | 安装一个依赖包,并将其添加到package.json |
| 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 Registry操作 |
| npm run/test | yarn run/test | 执行项目命令或测试任务 |
转载地址:http://mqjfk.baihongyu.com/