引入
在我们写markdown文档的时候,页面没有实时更新,有强迫症的我感觉异常的难受…
解决
在package.json中的scripts中更改如下
将
vuepress dev docs
更改为
vuepress dev docs --temp .temp
项目启动后会生成
如果不想引入到git上,在gitignore上把它忽略就好了
全代码
{
"name": "study",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"serve": "vuepress dev docs --temp .temp",
"build": "vuepress build docs"
},
"keywords": [],
"author": "",
"license": "ISC"
}
(个人比较喜欢将启动改成serve,打包改成build)
接着
npm run serve
就行了