@@ -2,63 +2,63 @@ const child_process = require("child_process");
22
33const DEPENDENCIES = [ "prop-types" , "react" , "react-dom" , "react-hot-loader" ] ;
44const DEV_DEPENDENCIES = [
5- "@babel/cli" ,
6- "@babel/core" ,
7- "@babel/plugin-proposal-class-properties" ,
8- "@babel/preset-env" ,
9- "@babel/preset-react" ,
10- "babel-loader" ,
11- "brotli-webpack-plugin" ,
12- "compression-webpack-plugin" ,
13- "css-loader" ,
14- "eslint" ,
15- "eslint-plugin-react" ,
16- "file-loader" ,
17- "html-webpack-plugin" ,
18- "husky" ,
19- "jest" ,
20- "prettier" ,
21- "pretty-quick" ,
22- "style-loader" ,
23- "webpack" ,
24- "webpack-cli" ,
25- "webpack-dev-server" ,
26- "webpack-manifest-plugin" ,
27- "webpack-merge"
5+ "@babel/cli" ,
6+ "@babel/core" ,
7+ "@babel/plugin-proposal-class-properties" ,
8+ "@babel/preset-env" ,
9+ "@babel/preset-react" ,
10+ "babel-loader" ,
11+ "brotli-webpack-plugin" ,
12+ "compression-webpack-plugin" ,
13+ "css-loader" ,
14+ "eslint" ,
15+ "eslint-plugin-react" ,
16+ "file-loader" ,
17+ "html-webpack-plugin" ,
18+ "husky" ,
19+ "jest" ,
20+ "prettier" ,
21+ "pretty-quick" ,
22+ "style-loader" ,
23+ "webpack" ,
24+ "webpack-cli" ,
25+ "webpack-dev-server" ,
26+ "webpack-manifest-plugin" ,
27+ "webpack-merge" ,
2828] ;
2929const PROD_DEPENDENCIES = [ "express" , "express-static-gzip" ] ;
3030
3131/**
3232 * Returns npm command for installing dependencies
3333 */
3434function getDependencies ( ) {
35- var installCommand = "npm install --save" ;
36- DEPENDENCIES . forEach ( dependency => {
37- installCommand += ` ${ dependency } ` ;
38- } ) ;
39- return installCommand ;
35+ var installCommand = "npm install --save" ;
36+ DEPENDENCIES . forEach ( dependency => {
37+ installCommand += ` ${ dependency } ` ;
38+ } ) ;
39+ return installCommand ;
4040}
4141
4242/**
4343 * Returns npm command for installing dev-dependencies
4444 */
4545function getDevDependencies ( ) {
46- var installCommand = "npm install --save-dev" ;
47- DEV_DEPENDENCIES . forEach ( dependency => {
48- installCommand += ` ${ dependency } ` ;
49- } ) ;
50- return installCommand ;
46+ var installCommand = "npm install --save-dev" ;
47+ DEV_DEPENDENCIES . forEach ( dependency => {
48+ installCommand += ` ${ dependency } ` ;
49+ } ) ;
50+ return installCommand ;
5151}
5252
5353/**
5454 * Returns npm command for installing prod dependencies
5555 */
5656function getProdDependencies ( ) {
57- var installCommand = "npm install --save" ;
58- PROD_DEPENDENCIES . forEach ( dependency => {
59- installCommand += ` ${ dependency } ` ;
60- } ) ;
61- return installCommand ;
57+ var installCommand = "npm install --save" ;
58+ PROD_DEPENDENCIES . forEach ( dependency => {
59+ installCommand += ` ${ dependency } ` ;
60+ } ) ;
61+ return installCommand ;
6262}
6363
6464/**
@@ -69,22 +69,22 @@ function getProdDependencies() {
6969 * @param {String } options.stdio process's stdio config
7070 */
7171function installDependencies ( commands , options ) {
72- options . stdio = options . stdio || "inherit" ;
72+ options . stdio = options . stdio || "inherit" ;
7373
74- if ( commands ) {
75- try {
76- commands . forEach ( command => {
77- child_process . execSync ( command , options ) ;
78- } ) ;
79- } catch ( error ) {
80- throw error ;
81- }
82- }
74+ if ( commands ) {
75+ try {
76+ commands . forEach ( command => {
77+ child_process . execSync ( command , options ) ;
78+ } ) ;
79+ } catch ( error ) {
80+ throw error ;
81+ }
82+ }
8383}
8484
8585module . exports = {
86- installDependencies,
87- getDependencies,
88- getDevDependencies,
89- getProdDependencies
86+ installDependencies,
87+ getDependencies,
88+ getDevDependencies,
89+ getProdDependencies,
9090} ;
0 commit comments