vue开发环境及npm镜像替换
2019-05-04 本文已影响0人
chan_it
vue的开发环境
https://www.cnblogs.com/dwj88/p/7606224.html
1.安装webpack: npm install -g webpack
npm install -g webpack
2.安装vue-cli: vue-cli 是vue.js的脚手架,用于自动生成vue.js模板工程的。
npm install -g vue-cli
vue init webpack project-name
npm的镜像替换为淘宝
- 得到原本的镜像地址: npm get registry (为https://registry.npmjs.org/)
npm get registry
- 设为淘宝镜像
npm config set registry http://registry.npm.taobao.org
yarn config set registry http://registry.npm.taobao.org
- 换为原来的:npm config set registry https://registry.npmjs.org
npm config set registry https://registry.npmjs.org