File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### Fixes
66
7+ - [ Issue #12 ] - html-to-app -c should kill program after creating config file
8+
79## [ 0.1.0] - 2018-03-26
810
911### Additions
Original file line number Diff line number Diff line change @@ -72,36 +72,42 @@ try {
7272}
7373catch ( ex ) {
7474
75- // Create a config file if asked to do so
76- if ( cli . args . createConfig ) {
75+ console . log ( "No configuration, using defaults." ) ;
76+
77+ }
7778
78- // Check for config dir
79- if ( ! fs . existsSync ( "config" ) ) {
80- // Create dir
81- executeCommand ( "mkdir config" ) ;
82- }
83-
84- // Check for environment config file
85- if ( ! fs . existsSync ( "config/" + env + ".json" ) ) {
86-
87- // Create file
88- fs . writeFileSync ( "config/" + env + ".json" ,
89- JSON . stringify (
90- {
91- "importer" : importer ,
92- "converter" : converter ,
93- "builder" : builder ,
94- "exporter" : exporter
95- } ,
96- null ,
97- '\t'
98- )
99- ) ;
100-
101- }
79+ // Create a config file if asked to do so
80+ if ( cli . args . createConfig ) {
10281
82+ // Check for config dir
83+ if ( ! fs . existsSync ( "config" ) ) {
84+ // Create dir
85+ executeCommand ( "mkdir config" ) ;
10386 }
10487
88+ // Check for environment config file
89+ if ( ! fs . existsSync ( "config/" + env + ".json" ) ) {
90+
91+ // Create file
92+ fs . writeFileSync ( "config/" + env + ".json" ,
93+ JSON . stringify (
94+ {
95+ "importer" : importer ,
96+ "converter" : converter ,
97+ "builder" : builder ,
98+ "exporter" : exporter
99+ } ,
100+ null ,
101+ '\t'
102+ )
103+ ) ;
104+
105+ }
106+
107+ // Kill the program
108+ console . log ( "Configuration file created successfully." ) ;
109+ process . exit ( ) ;
110+
105111}
106112
107113// Append properties to payload
You can’t perform that action at this time.
0 commit comments