一.下載安裝nodejs
官網地址:Node.js — 在任何地方運行 JavaScript
二.下載安裝vscode代碼編輯器
官網地址:Download Visual Studio Code - Mac, Linux, Windows
三.修改本地腳本策略
1,windows+i 打開電腦設置
2,輸入powershell
3,開啟
四.正題:?
簡單命令的使用:
1,查看環境版本
node -v
npm -v
2,安裝和卸載第三方包
npm install crypto-js
npm uninstall crypto-js
3,查看包版本
npm list // 查看所有
npm list crypto-js
?4,換源
npm config get registry // 查看當前的源
npm config set registry https://registry.npmmirror.com // 換成國內淘寶源
npm update // 更新所有下載的模塊
npm update crypto-js // 后面跟模塊就是更新某個模塊
?5,安裝國內版的npm,由淘寶團隊開發(進階操作,適合安裝很大的第三方庫)?
npm install -g cnpm --registry-https://registry.npmmirror.com
cnpm install crypto-js