- 定位:包管理工具,替代npm
- 安装速度快,版本锁定,缓存机制
- Yarn的安装:npm install yarn -g
Yarn 语法
- yarn init
- yarn
- yarn global add xxx@x.x.x
- yarn add xxx@x.x.x --dev
- yarn remove xxx
- yarn run xxx
npm 语法
- npm init
- npm install
- npm install xxx@x.x.x -g
- npm install xxx@x.x.x --save
- npm install xxx@x.x.x --save-dev
- npm uninstall xxx --save(-dev)
- npm run xxx
网友评论