从 NPM 到纱线
对于大多数情况,如果你了解 NPM,那么你已经确定了!
这会在项目的根目录中添加一个“package.json”文件
npm init === yarn init
这些都是一样的:
npm link === yarn link
npm outdated === yarn outdated
npm publish === yarn publish
npm run === yarn run
npm cache clean === yarn cache clean
npm login === yarn login
npm logout === yarn logout
npm test === yarn test
‘Install’是 Yarn 的默认行为
npm install === yarn
The React Js library is saved in your package.json file:
npm install react --save === yarn add react
npm install -g @angular/cli === yarn global add @angular/cli