创建一个vue/cli项目

安装

npm install -g @vue/cli

创建项目

➜  nodejs git:(master) vue create vue-demo

ue CLI v4.5.15
? Please pick a preset: Manually select features
? Check the features needed for your project:
 ◉ Choose Vue version
 ◉ Babel
 ◯ TypeScript
 ◯ Progressive Web App (PWA) Support
 ◉ Router
 ◉ Vuex
 ◉ CSS Pre-processors
❯◯ Linter / Formatter
 ◯ Unit Testing
 ◯ E2E Testing
 
Vue CLI v4.5.15
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex, CSS Pre-processors
? Choose a version of Vue.js that you want to start the project with 3.x
? Use history mode for router? (Requires proper server setup for index fallback in production) No
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Less
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? Yes
? Save preset as: hello-vue

🎉  Preset hello-vue saved in /Users/moilions/.vuerc


Vue CLI v4.5.15
✨  Creating project in /Users/moilions/mayun/nodejs/vue-demo.
⚙️  Installing CLI plugins. This might take a while...


added 1240 packages in 25s

10 packages are looking for funding
  run `npm fund` for details
🚀  Invoking generators...
📦  Installing additional dependencies...


added 36 packages in 6s

10 packages are looking for funding
  run `npm fund` for details
⚓  Running completion hooks...

📄  Generating README.md...

🎉  Successfully created project vue-demo.
👉  Get started with the following commands:

 $ cd vue-demo
 $ npm run serve

➜  nodejs git:(master)

启动项目

➜  vue-demo git:(master)pwd
/Users/moilions/mayun/nodejs/vue-demo
➜  vue-demo git:(master)npm run serve

> vue-demo@0.1.0 serve
> vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 DONE  Compiled successfully in 2334ms                                                                    下午10:08:37


  App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://192.168.50.245:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.


浏览器中访问http://localhost:8080/即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值