用vscode打开已有的vue文件
1.在GitHub下载文件,解压
2.扩展中下载vetur,eslint
3.打开vscode/文件/首选项/设置/搜索vetur
在用户设置中输入
{
"vetur.validation.template": false,
/*这里我们设置字体大小为17,
tab缩进为2个空格,
eslint的校验适用于js、html、vue,
设置vscode图标为vscode-icons*/
"editor.fontSize": 17,
"editor.tabSize": 2,
"editor.formatOnSave": false,
"files.associations": {
"*.vue": "vue"
},
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue",
{
"language": "html",
"autoFix": true
}
],
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": [
"css",
"html",
"less"
]
},
"editor.fontFamily": "Source Code Pro, 'Courier New', monospace",
"files.autoSave": "off",
"workbench.iconTheme": "vscode-icons"
}
4.在终端输入npm install
然后在输入npm run dev
参考:https://github.com/caiya/frontend