Skip to content

Commit 6549d4d

Browse files
authored
Merge pull request #15 from StatelessSoftware/v0.1.1
V0.1.1
2 parents ccef1b0 + e109c9d commit 6549d4d

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
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

index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff 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
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": {

0 commit comments

Comments
 (0)