一、安装vue

npm install vue -g

二、用vue-cli快速搭建项目

//全局安装vue-cli
npm install install -g vue-cli
//创建一个基于webpack模板的项目
vue init webpack [demoname] ? Project name (xxx)
? Project name xxxx
? Project description (A Vue.js project)
? Project description A Vue.js project
? Author (xj <x@xm.com>)
? Author xx <x@xlm.com>
? Vue build (Use arrow keys)
? Vue build standalone
? Install vue-router? (Y/n) y
? Install vue-router? Yes
? Use ESLint to lint your code? (Y/n) n
? Use ESLint to lint your code? No
? Set up unit tests (Y/n) n
? Set up unit tests No
? Setup e2e tests with Nightwatch? (Y/n) n
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recom
? Should we run `npm install` for you after the project has been created? (recom
mended) npm vue-cli · Generated "paixiaoyang_backstage". # Installing project dependencies ...
# ======================== npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes andnew features!
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. > uglifyjs-webpack-plugin@0.4.6 postinstall F:\work\paixiaoyang_backstage\paixiaoyang_backstage\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) added 1127 packages from 646 contributors and audited 10642 packages in 157.659s
found 2 vulnerabilities (1 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details # Project initialization finished!
# ======================== To get started: cd xxxx
npm run dev Documentation can be found at https://vuejs-templates.github.io/webpack

三、进入项目运行

cd xxxx

//运行
npm run dev

四、在浏览器上打开localhost:8080

最新文章

  1. JavaScript:正则表达式 前瞻
  2. [LeetCode] Missing Ranges 缺失区间
  3. Python介绍
  4. Github.com的Git和TortoiseGit图文教程
  5. js控制键盘只能输入数字和退格键,delete键
  6. LoadRunner关联之学习笔记
  7. drivers/mfd/Mfd-core.c
  8. 管道寄售库存MRKO结算后,冲销问题
  9. Linux自启动
  10. 任意轴算法 ( Arbitrary Axis Algorithm )
  11. Hyper-V连接虚拟机异常,“无法进行连接,因为可能无法将凭据发送到远程计算机”
  12. 2017-4-24 WinForm开发基础、窗体的属性CenterScreen
  13. JavaScript操作cookie基础分析
  14. 微信小程序语音识别服务搭建全过程解析(项目开源在github)
  15. (转)Linux下C++开发初探
  16. Cocos2D iOS之旅:如何写一个敲地鼠游戏(二):Cocos2D中的高清支持
  17. MySQL之日期时间类型
  18. JS中的事件委托(事件代理)
  19. 在spring中实现quartz2.2.1的动态调度(开始、暂停、停止等)
  20. 如何保证 spring-boot 和 spring-cloud版本一致

热门文章

  1. spoj 371 Boxes【最小费用最大流】
  2. C++中的显式构造函数
  3. macbook pro上安装vmware虚拟机
  4. Drawable(6)关于StateList的补充
  5. Android 线程池系列教程(1)目录
  6. [转]C# 邮箱验证激活
  7. C语言中Static和Const关键字的的作用 -- 转
  8. 善用oss客户端工具
  9. android开发学习 ------- 弹出框
  10. 教你如何在实战项目中使用WCF