File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# html-baker
22
3+ ## [ 0.1.1] - 2018-04-03
4+
5+ ### Fixes
6+
7+ - [ Issue #14 ] - Bake fails with eternallybored's wget for Windows
8+ - [ Issue #12 ] - Doesn't properly kill server
9+
310## [ 0.1.0] - 2018-03-31
411
512### Additions
Original file line number Diff line number Diff line change @@ -50,20 +50,19 @@ if (config.input && config.input.directory && config.input.runcmd) {
5050 server . stdout . on ( "data" , ( data ) => {
5151 serverStarted = true ;
5252 download ( ) ;
53+ server . kill ( ) ;
5354 } ) ;
5455 server . stderr . on ( "data" , ( data ) => {
5556 console . log ( `Server Error: ${ data } ` ) ;
56- process . kill ( ) ;
57+ server . kill ( ) ;
5758 } ) ;
5859 server . on ( "close" , ( code ) => {
5960 console . log ( `Server exited with code ${ code } ` ) ;
60- serverStarted = false ;
61- process . kill ( ) ;
61+ process . exit ( ) ;
6262 } )
6363 server . on ( "exit" , ( code ) => {
6464 console . log ( `Server exited with code ${ code } ` ) ;
65- serverStarted = false ;
66- process . kill ( ) ;
65+ process . exit ( ) ;
6766 } )
6867
6968}
@@ -114,7 +113,13 @@ function download() {
114113 console . log ( "Running " + wgetcmd ) ;
115114
116115 try {
117- shell . execSync ( wgetcmd ) ;
116+
117+ try {
118+ shell . execSync ( wgetcmd ) ;
119+ }
120+ catch ( ex ) {
121+ console . log ( "Wget exited unexpectedly. Please check output before committing." ) ;
122+ }
118123
119124 // Run the post command
120125 if ( config . postcmd && config . postcmd . length ) {
@@ -154,10 +159,5 @@ function download() {
154159 // Server not started
155160 console . log ( "Server wasn't started." ) ;
156161 }
157-
158- if ( server ) {
159- server . kill ( ) ;
160- }
161- process . exit ( ) ;
162162
163163}
Original file line number Diff line number Diff line change 11{
22 "name" : " html-baker" ,
3- "version" : " 0.1.0 " ,
3+ "version" : " 0.1.1 " ,
44 "description" : " Convert websites into flat-file websites" ,
55 "main" : " index.js" ,
66 "bin" : {
You can’t perform that action at this time.
0 commit comments