vue项目目录介绍

时间:2023-03-08 21:53:17

Vue项目目录

初始化项目
vue init webpack []projectname]
cd [projectname]
npm install
vue run dev

目录树


+---build
| build.js
| check-versions.js
| dev-client.js
| dev-server.js
| utils.js
| vue-loader.conf.js
| webpack.base.conf.js
| webpack.dev.conf.js
| webpack.prod.conf.js
|
+---config
| dev.env.js
| index.js
| prod.env.js
|
+---src
| | App.vue
| | main.js
| |
| +---assets
| | logo.png
| |
| \---components
| Hello.vue
|
---static
|--------- .gitkeep
| .babelrc
| .editorconfig
| .eslintignore
| .eslintrc.js
| .gitignore
| .postcssrc.js
| index.html
| package.json
\ README.md
目录详解
  • .babelrc : ES6 转 ES5 时,保证兼容浏览器
  • .editorconfig : 编辑器的环境配置
charset = utf-8
indent_style = space //缩进方式
indent_size = 2 //缩进长度
end_of_line = lf //换行符风格
insert_final_newline = true //文件末尾插入新行
trim_trailing_whitespace = true //自动移除行尾空格
  • .eslintignore :忽略ESLint语法检查的文件目录配置
  • .eslintrc.js :eslint的配置文件

ESLint官网】官网中有相关文档对配置进行解释

  • .gitignore:用于将项目放于github时,需要忽略的文件目录配置
  • package.json:项目的配置文件
  • index.html:项目的入口文件