Skip to content

Commit faa10d7

Browse files
committed
fix spwan error
1 parent c2f219c commit faa10d7

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ function parseUml(page) {
1313

1414
function execFile(command, args, callback) {
1515
var prc = spawn(command, args);
16+
17+
prc.on('error', function (err) {
18+
console.log('cannot spawn java');
19+
});
20+
1621
prc.stdout.on('data', function(data) {
1722
console.log(data.toString());
1823
});
@@ -55,12 +60,12 @@ module.exports = {
5560

5661
// This is called before the book is generated
5762
"init": function() {
58-
console.log("init gitbook-plantUML!");
63+
console.log("init gitbook-plugin-plantuml!");
5964
},
6065

6166
// This is called after the book generation
6267
"finish": function() {
63-
console.log("finish gitbook-plantUML!");
68+
console.log("finish gitbook-plugin-plantuml!");
6469
},
6570

6671
// The following hooks are called for each page of the book
@@ -82,7 +87,7 @@ module.exports = {
8287
//UML
8388
debugger;
8489
try {
85-
execFile('java', ['-jar',
90+
execFile('javaa', ['-jar',
8691
'plantuml.jar',
8792
'-tsvg',
8893
'plantuml.uml',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitbook-plugin-plantuml",
33
"description": "PlantUML plugin for GitBook",
44
"main": "index.js",
5-
"version": "0.0.3",
5+
"version": "0.0.4",
66
"engines": {
77
"gitbook": "*"
88
},

0 commit comments

Comments
 (0)