@@ -29,18 +29,18 @@ module.exports = class Processor {
29
29
* @returns {* }
30
30
*/
31
31
processFile ( config ) {
32
- let file = new File ( ) ;
32
+ const file = new File ( ) ;
33
33
34
- let pathSource = this . resolvePath ( config . source ) ,
35
- pathOutput = this . resolvePath ( config . output ) ;
34
+ const pathSource = this . resolvePath ( config . source ) ;
35
+ const pathOutput = this . resolvePath ( config . output ) ;
36
36
37
- let packageJsonPath = this . resolvePath ( pathSource ) ,
38
- packageJsonContent = fs . readFileSync ( packageJsonPath ) ;
37
+ const packageJsonPath = this . resolvePath ( pathSource ) ;
38
+ const packageJsonContent = fs . readFileSync ( packageJsonPath ) ;
39
39
40
40
/** @param {{extra: {}} } content */
41
- let packageJson = JSON . parse ( packageJsonContent ) ,
42
- solvedJson = this . resolveOverwritten ( config . envMap ) ,
43
- completedJson = this . constructor . getMergedData ( packageJson , solvedJson ) ;
41
+ const packageJson = JSON . parse ( packageJsonContent ) ;
42
+ const solvedJson = this . resolveOverwritten ( config . envMap ) ;
43
+ const completedJson = this . constructor . getMergedData ( packageJson , solvedJson ) ;
44
44
45
45
file . setSourcePath ( pathSource )
46
46
. setOutputPath ( pathOutput )
@@ -61,11 +61,11 @@ module.exports = class Processor {
61
61
}
62
62
63
63
resolveOverwritten ( envMapping ) {
64
- let object = { } ;
64
+ const object = { } ;
65
65
66
- for ( let abstractPath of Object . keys ( envMapping ) ) {
67
- let envVariable = envMapping [ abstractPath ] ,
68
- value = this . constructor . getEnvironmentValue ( envVariable ) ;
66
+ for ( const abstractPath of Object . keys ( envMapping ) ) {
67
+ const envVariable = envMapping [ abstractPath ] ;
68
+ const value = this . constructor . getEnvironmentValue ( envVariable ) ;
69
69
70
70
overwriteFieldValue ( abstractPath , value , object ) ;
71
71
}
0 commit comments