File tree Expand file tree Collapse file tree 1 file changed +38
-39
lines changed Expand file tree Collapse file tree 1 file changed +38
-39
lines changed Original file line number Diff line number Diff line change @@ -79,44 +79,43 @@ sourceDirs.forEach(x => {
79
79
} ) ;
80
80
rebuild ( ) ;
81
81
82
- const readline = require ( "readline" ) ;
83
-
84
- const rl = readline . createInterface ( {
85
- input : process . stdin ,
86
- output : process . stdout
87
- } ) ;
88
-
89
82
var child_process = require ( "child_process" ) ;
90
- rl . on ( "line" , input => {
91
- switch ( input . toLowerCase ( ) ) {
92
- case "r" :
93
- rebuild ( ) ;
94
- break ;
95
- case "config" :
96
- if ( isBuilding ) {
97
- console . log ( `it's building` ) ;
98
- } else {
99
- isBuilding = true ;
100
- child_process
101
- . fork ( path . join ( __dirname , "ninja.js" ) , [ "config" ] )
102
- . on ( "close" , ( ) => {
103
- isBuilding = false ;
104
- rebuild ( ) ;
105
- } ) ;
106
- }
107
- break ;
108
- case "clean" :
109
- if ( isBuilding ) {
110
- console . log ( `it's building` ) ;
111
- } else {
112
- isBuilding = true ;
113
- child_process
114
- . fork ( path . join ( __dirname , "ninja.js" ) , [ "cleanbuild" ] )
115
- . on ( "close" , ( ) => {
116
- isBuilding = false ;
117
- } ) ;
118
- }
83
+ var readline = require ( "readline" ) ;
84
+ readline
85
+ . createInterface ( {
86
+ input : process . stdin ,
87
+ output : process . stdout
88
+ } )
89
+ . on ( "line" , input => {
90
+ switch ( input . toLowerCase ( ) ) {
91
+ case "r" :
92
+ rebuild ( ) ;
93
+ break ;
94
+ case "config" :
95
+ if ( isBuilding ) {
96
+ console . log ( `it's building` ) ;
97
+ } else {
98
+ isBuilding = true ;
99
+ child_process
100
+ . fork ( path . join ( __dirname , "ninja.js" ) , [ "config" ] )
101
+ . on ( "close" , ( ) => {
102
+ isBuilding = false ;
103
+ rebuild ( ) ;
104
+ } ) ;
105
+ }
106
+ break ;
107
+ case "clean" :
108
+ if ( isBuilding ) {
109
+ console . log ( `it's building` ) ;
110
+ } else {
111
+ isBuilding = true ;
112
+ child_process
113
+ . fork ( path . join ( __dirname , "ninja.js" ) , [ "cleanbuild" ] )
114
+ . on ( "close" , ( ) => {
115
+ isBuilding = false ;
116
+ } ) ;
117
+ }
119
118
120
- break ;
121
- }
122
- } ) ;
119
+ break ;
120
+ }
121
+ } ) ;
You can’t perform that action at this time.
0 commit comments