NPM
# 安装
# -g 全局安装
# -S --save 写入dependencies
# -D --save-dev 写入devDependencies
npm install x
# 卸载
npm uninstall x
# 查看所有全局安装的模块
npm ls -g
# 修改镜像
# 直接用淘宝镜像cnpm
npm i -g cnpm --registry=https://registry.npm.taobao.org
# 改变npm镜像,指向淘宝镜像
npm config get registry
npm config set registry=https://registry.npm.taobao.org
# 恢复镜像:
npm config delete registry
npm config edit(手动删除)
# 执行脚本:
npm run 在package.json的scripts中定义的脚本命令
# 创建模块,生成 package.json 文件
npm init
vue-cli
# 安装
npm install -g @vue/cli
# OR
yarn global add @vue/cli
# vue-cli 创建项目(不能有大写字母)
vue create xxx
vue init webpack xxx
# 创建后
cd xxx
npm run serve
npm run dev / npm start
# 打包生产
npm run build