准备工作
- Nodejs安装
建议安装在非系统盘的英文目录下
Node
环境配置
新建文件夹 --- node_cache
和 node_global
(npm install -g package-name
)
创建完文件后,需要更改 npmrc
中的 perfix
和 cache
npm config set prefix "E:\Program Files (x86)\Nodejs\node_global"
npm config set cache "E:\Program Files (x86)\Nodejs\node_cache"
你需要替换你的安装目录
- Vue-cli安装
npm run -g vue
vue -V
- 创建
Vue
项目
vue init webpack project-name
- 修改
Vue
项目配置
config/index.js
--> build
--> assetsPublicPath
--> /
--> ./
build/webpack.prod.conf.js
--> new HtmlWebpackPlugin
--> removeAttributeQuotes
--> true
--> false
.gitignore
--> 注释/dist/
- 项目打包
npm run build
- 项目测试
在使用http-server前,需要安装 npm i -g http-server
http-server ./dist
- 创建
Github
项目
本地
Vue
项目Push
到Github官网
git init
git add .
git commit -m 'init vue project'
git remote add origin git@github.com:Rain120/demo.git
git pull origin master --allow-unrelated-histories
git push -u origin master




7. `Github Setting` -- 配置`Github page`
Settings

Github Pages

Save Setting

**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。