通过VUE/CLI3X 创建VUE程序
1,创建项目
vue create 项目名称
2,选项
? Please pick a preset: (Use arrow keys)
default (babel, eslint) // 默认选项
Manually select features // 手动选择功能
? Your connection to the default npm registry seems to be slow.
Use https://registry.npm.taobao.org for faster installation? (Y/n) --是否使用淘宝镜像
-----N
Vue CLI v4.5.12
? Please pick a preset: Manually select features --手动选择功能
Vue CLI v4.5.12
? Please pick a preset: (Use arrow keys)
> Default ([Vue 2] babel, eslint) ----// Vue 2默认选项
Default (Vue 3 Preview) ([Vue 3] babel, eslint) ----// Vue 3默认选项
Manually select features ----// 手动选择功能
-----Manually select features
? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex, CSS Pre-processors, Linter
移动到项目行空格选中
Vue CLI v4.5.12
? 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)
>(*) Choose Vue version
(*) Babel --ES6转ES5
( ) TypeScript --JS超集
( ) Progressive Web App (PWA) Support --渐进式Web应用
(*) Router --路由
(*) Vuex --状态管理
(*) CSS Pre-processors --CSS预处理
(*) Linter / Formatter --规范类型
( ) Unit Testing --测试
( ) E2E Testing --测试
? Choose a version of Vue.js that you want to start the project with 3.x (Preview) --VUE3
? Use history mode for router? (Requires proper server setup for index fallback in production) No --路由是否使用history模式
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass) --CSS预处理
dart-sass与node-sass
都是用来将sass编译成css的工具
dart-sass
是用 drat VM 来编译 sass
保存后才会生效
node-sass
是用 node(调用 cpp 编写的 libsass)来编译 sass
自动编译实时
? Pick a linter / formatter config: Standard --格式验证 --Standard 正常模式
? Pick additional lint features: Lint on save --选择校验时机 --保存时检测
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files --自定义配置的存放位置 --存放在专用配置文件中
? Save this as a preset for future projects? No --是否保存当前选择的配置项 --不

浙公网安备 33010602011771号