首页 > 其他 > 详细

安装vue-cli脚手架构建工具

时间:2019-02-12 17:37:17      阅读:197      评论:0      收藏:0      [点我收藏+]

vue安装

1.vue安装:

$ cnpm install vue

 

2.安装vue-cli脚手架构建工具:

# 全局安装 vue-cli
$ cnpm install --global vue-cli

 

3.构建于webpack模板的一个新项目:

#my-project为自定义项目名
$ vue init webpack my-project

初始化一个项目,或使用
$ vue init webpack-simple my-project

 

4.init

技术分享图片
Project name (my-project) # 项目名称(我的项目)

Project description (A Vue.js project) # 项目描述一个Vue.js 项目

Author 作者(你的名字)

Install vue-router? (Y/n) # 是否安装Vue路由,也就是以后是spa(但页面应用需要的模块)

Use ESLint to lint your code? (Y/n) # 使用 ESLint 到你的代码? (Y [ yes ] / N [ no ])

Pick an ESLint preset (Use arrow keys) # 选择一个预置ESLint(使用箭头键)

Setup unit tests with Karma + Mocha? (Y/n) # 设置单元测Karma + Mocha? (Y/ N)

Setup e2e tests with Nightwatch? (Y/n) # 设置端到端测试,Nightwatch? (Y/ N)



技术分享图片
技术分享图片
技术分享图片

? Project name vue-demo

? Project description demo

? Author luoxiaowei <luoxiaowei@100tal.com>

? Vue build standalone

? Install vue-router? Yes

? Use ESLint to lint your code? Yes

? Pick an ESLint preset none

? Set up unit tests No

? Setup e2e tests with Nightwatch? No

? Should we run `npm install` for you after the project has been created? (recom

mended) npm

 

cd vue-demo

cnpm run dev 

安装vue-cli脚手架构建工具

原文:https://www.cnblogs.com/michell/p/10366092.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!