Hi, everybody, my name is EricWang, I am a college student from China, currently at lanzhou university of technology, grade three.
CN
这个仓库主要讲解了前端项目常用的一些文件配置以及使用教学,包括一个标准前端工程师的必备软技能,如果你有兴趣,欢迎PR。
EN
This repository mainly explains some common file configuration and usage teaching of front-end projects, including the necessary soft skills of a standard front-end engineer. If you are interested, welcome PR. If you have any questions, please feel free to contact me. My personal contact information is at the bottom of the document.
.gitattributes
主要用来帮助github去更加精准的识别你的项目使用了什么语言。
- 跟随
git push
一并commit就OK!
.gitignore
主要用来帮助commit命令去辅助识别项目上传git需要过滤哪些文件。
- 创建文件在项目的根目录,自行生效。
.editorconfig
主要用来记录当前项目的代码风格,保证当前项目在不同的机器以及IDE上不会出现样式错乱。
-
第一步:新建该文件夹,也可以不建立。
-
第二步:附图。
- 第三步:单击export就会自动覆盖当前项目目录下的配置文件。
.browserslistrc
主要用来指定项目运行的浏览器版本或者类型。
- 参见传送门
vue.config.js
主要用来适配Vue cli@3.0去配置vue项目,webpack会默认加载该文件。
-
第一步:
vue create newProject
-
第二步:新建
vue.config.js
文件在项目根目录下。 -
第三步:
npm run serve
-
配置细节参见传送门
babel.config.js
是babel@7.0的默认加载配置文件,用于将高于es5.1版本的js代码转为@5.0版本,也是为了更好的适配浏览器。
-
第一步:初始化项目
npm init
-
第二步:安装依赖
npm install --save-dev @babel/core @babel/cli @babel/preset-env
npm install --save @babel/polyfill
-
第三步:创建配置文件
-
第四步:附图。
.eslintrc.js
是代码质量检测工具ESlint的默认配置文件。
- 第一步:安装必要依赖
npm install -g eslint
npm install -g eslint-config-standard
npm install -g eslint-plugin-html
npm install -g eslint-plugin-promise
npm install -g eslint-plugin-standard
npm install -g eslint-plugin-sort-class-members
npm install -g babel-eslint
npm install -g eslint-plugin-babel
-
第二步:在项目根目录创建配置文件
-
第三步:附图。
webpack.config.js
是配合webpack打包工具使用的配置文件。
- 第一步:安装
npm install -g less
- 第二步:附图
- 参见官网
- 参见官网
- 参见API
- 参见BillWang
-
第一步:在代码中根据JS注释标准去书写代码注释。
-
第二步:install
npm install -g jsdoc
- 第三步:生成注释文档
jsdoc demo.js
- 参见说明书
- 参见白皮书
- 参见白皮书
📕你不知道的JavaScript(上卷).pdf)
📕你不知道的JavaScript(中卷).pdf)
📕你不知道的JavaScript(下卷).pdf)
MyBlog: https://bigdreamer.cc
温馨提示:左侧微信,右侧支付宝!
License GPL3.0
Copyright (c) 2019 Eric Wang