從 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