npm和yarn使用命令如下:
//兩者是等效的
npm init
yarn init
npm install
yarn
npm install [email protected] -g
yarn global add [email protected]
npm install [email protected] --save
yarn add [email protected]
npm install [email protected] --save-dev
yarn add [email protected] --dev
npm uninstall xxx --save(-dev)
yarn remove xxx
npm run xxx
yarn run xxxx