vue创建项目步骤

本文详细介绍了如何使用Vue CLI创建项目,从全局安装Node.js,到通过命令行创建项目,选择预设特性,如Babel、Linter,以及配置选项,如是否使用TypeScript、Router、Vuex等。最后提到了保存配置作为模板供后续使用。
摘要由CSDN通过智能技术生成
  1. 全局安装node:https://nodejs.org/en/

2 安装@vue/cli

npm install -g @vue/cli

3 在想要存放项目的文件夹里打开命令行,输入命令 vue create test(项目名自起)

3.1 选择创建项目的方式,默认和手动选择

Vue CLI v5.0.4
? Please pick a preset: (Use arrow keys)
> Default ([Vue 3] babel, eslint)
  Default ([Vue 2] babel, eslint)
  Manually select features

3.2选择需要的特性 、

Vue CLI v5.0.4
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and
<enter> to proceed)
 (*) Babel
 (*) TypeScript
 ( ) Progressive Web App (PWA) Support
 (*) Router
 (*) Vuex
>(*) CSS Pre-processors
 (*) Linter / Formatter
 ( ) Unit Testing
 ( ) E2E Testing

Vue CLI v5.0.4
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and
<enter> to proceed)
>(*) Babel=》支持高阶语法转换,例如转换es6
 ( ) TypeScript=>JS的超集
 ( ) Progressive Web App (PWA) Support=》渐进式网络应用支持
 ( ) Router=》路由

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值