美文网首页
Vue.js项目搭建

Vue.js项目搭建

作者: 微雨花间_b690 | 来源:发表于2018-10-24 20:52 被阅读0次

    第一步:安装vue-cli脚手架工具

    1、打开命令行工具,输入指令

       npm install -g vue-cli

    2、安装成功后,可以查看版本号

    vue --version

    3、如果可以查到 那么说明安装成功

    第二步:项目的搭建

    1、进入创建项目的目录下,使用命令行工具,输入

    vue init weback 项目名称

    2、创建完成后,我们就可以看到下面这波操作

    ![image.png](https://img.haomeiwen.com/i12234015/333f7a53d6a6e54c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

    Project name:项目名称

    Project description:项目描述

    Author:作者

    Vue build:运行时与编译

    Install vue-router?:是否安装路由?

    Use ESLint to lint your code?:是否进行代码检测?

    Setup unit tests with Karma + Mocha?:是否进行单元测试?

    Setup e2e tests with Nightwatch?:是否进行端对端测试?

    3、以上选项自由选择,仅供参考。

    第三步、项目搭建完毕后,用webstorm打开项目,在终端用 npm run dev运行,看到

    ![image.png](https://img.haomeiwen.com/i12234015/dfcab7729db00e6b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

    第四步、搭建完毕

    相关文章

      网友评论

          本文标题:Vue.js项目搭建

          本文链接:https://www.haomeiwen.com/subject/bxfftqtx.html