1. Manage all codes in one place, such as code management through code management tools such as git, svn, vss, etc., and control the quality and process of the code through management tools;
2. Unify code writing standards, comment standards, styles, etc. This aspect involves different aspects. Because in the previous paragraph, we generally think that there are three aspects that need to be standardized: the first is HTML writing specifications and nesting rules, the second is CSS, and the third is JavaScript.
I don’t know what point the questioner wants to ask about above?
We use jscs and eslint to perform static checks together. Both of them can even be automatically repaired by adding the --fix parameter. For example, it was originally stipulated that semicolons were required, but later the stipulation was changed that no semicolons were required. Just change the jscs configuration and run the following command, and all files will be ready.
Uglify the application environment and Beautify the production environment. However, Beautify is just an intermediate process. Commonly used ones are: Gulp, Grunt, NPM + Webpack; involving inspection, compilation, merging and compression;
It is better to use grunt
I happened to see a HTML and CSS specification from NetEase http://nec.netease.com/standard, you can refer to it.
JavaScript Code Style
Airbnb’s public code style
There is also bootstrap.
There are still some similar tools, front-end scaffolding. Like gulp, grunt, fis, webpack, browserify, THX and many more. See official documentation.
Code Format Specification
jshint
eshint syntax check
Eslint
+Webpack
, it’s all up to your standardsI think unified management code has two meanings:
1. Manage all codes in one place, such as code management through code management tools such as git, svn, vss, etc., and control the quality and process of the code through management tools;
2. Unify code writing standards, comment standards, styles, etc. This aspect involves different aspects. Because in the previous paragraph, we generally think that there are three aspects that need to be standardized: the first is HTML writing specifications and nesting rules, the second is CSS, and the third is JavaScript.
I don’t know what point the questioner wants to ask about above?
We use jscs and eslint to perform static checks together. Both of them can even be automatically repaired by adding the --fix parameter.
For example, it was originally stipulated that semicolons were required, but later the stipulation was changed that no semicolons were required. Just change the jscs configuration and run the following command, and all files will be ready.
Uglify the application environment and Beautify the production environment. However, Beautify is just an intermediate process. Commonly used ones are: Gulp, Grunt, NPM + Webpack; involving inspection, compilation, merging and compression;