vue--1.环境搭建及创建项目

转自https://blog.csdn.net/junshangshui/article/details/80376489

一.环境搭建及创建项目

1.安装node.js,webpack

2.安装vue脚手架cli

   npm install vue-cli –g

3.新建项目

   vue init webpack vue-hello

   其中需要用上下键选择(选择上面默认的那条)

4.切换到项目目录安装项目依赖项(即生成node_modules文件夹)

   cd vue-hello

   npm install

扫描二维码关注公众号,回复: 4054450 查看本文章

5.运行项目,http://localhost:8080地址访问

   npm run dev

二.vscode中配置相关插件

1.安装vetur插件,是vue语法的高亮插件。
2.安装eslint插件,是智能错误检测插件。

3.通过左边拓展-搜索进行安装。

4.安装后进行如下设置,文件--首选项--设置--用户设置

    "emmet.syntaxProfiles": {
        "vue-html": "html",
        "vue": "html"
    },
    
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "html",
        "vue"
    ],
    
    "eslint.options": {
        "plugins": ["html"]
    }

猜你喜欢

转载自www.cnblogs.com/lvshoutao/p/9951543.html