vue-cli3.0-beta vue脚手架3.0的使用

中文文档
https://github.com/vuejs/vue-docs-zh-cn
在安装之前请装好nodeJs

1.使用

npm install -g @vue/cli
# or
yarn global add @vue/cli

查看版本(是否安装成功):vue -V(大写的V)


 
vue-cli3.0-beta vue脚手架3.0的使用_第1张图片
11576163-5ebc6d418467d0c4.png

2.命令变化

  Commands:

    create [options]       create a new project powered by vue-cli-service // 创建一个由vue-cli-service支持的新项目
    add  [pluginOptions]     install a plugin and invoke its generator in an already created project // 在已创建的项目中添加插件 invoke  [pluginOptions] invoke the generator of a plugin in an already created project // 在开发者模式下以零配置运行一个js或vue文件 inspect [options] [paths...] inspect the webpack config in a project with vue-cli-service // 在vue-cli-service的项目中检查webpack配置 serve [options] [entry] serve a .js or .vue file in development mode with zero config // 简单理解为开发环境下启动命令 build [options] [entry] build a .js or .vue file in production mode with zero config // 在生产模式下以零配置构建一个js或vue文件 init