demand -> prototype -> development -> test -> go online
1. version control
Selection git Version control .
* New branch for development ,master thread ,code review Merge after . * Using branches , Deploy different online versions
2. Technology selection
* According to business needs , Choosing the right technology -- vue-cli * Formulate unified coding standard , Easy for team work and code maintenance , for example eslint, tslint
3. Environment configuration
After the initialization project is completed , Submit code to remote library .
To keep the environment uniform , The following methods are recommended : * Shared by the team npm config Configuration item * use npm: >=5.1 edition , keep
package-lock.json File default open configuration * Submit package.json,
package-lock.json.package.json in , Project dependencies semver by ^X.Y.Z * First time for project members clone After project code , implement npm
install Install dependency package * node Version constraint
4. Construction optimization
According to the actual project , change webpack to configure .
5. directory structure
JS modularization ：AMD,CommonJS,UMD,ES6 Module CSS modularization ：less,sass,stylus,postCSS,css module
1. Project team customization ui assembly 2. Common function components , as 404, No permission 3. Public plug in 4. Common components between modules
3. Static resource management
1. Non modular resources 2. Modular resources -- Unified management with modules
Coding specification interface specification git Usage specification CodeReview UI Element specification
Reduce level references , Improve reusability
1.SIT testing environment
testing environment , Separation of front and rear ends , backstage CORS, Front desk cross domain through agent .
It's best to use source map mode , Good for tracking bug.
General test passed ,bug Shan Qingling , Will turn UAT test .
2.UAT testing environment
User acceptance test , Generally after passing , We're ready to deploy .
webpack After packaging , Drop it on the server , Project launch .
of course , Before going online , We need to optimize the performance , For example, configure the cache , Static resources CDN deploy .