hdoc-tools 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hdoc.js +9 -7
- package/package.json +1 -1
package/hdoc.js
CHANGED
|
@@ -36,10 +36,7 @@ const ui_path = path.join(__dirname, "ui");
|
|
|
36
36
|
|
|
37
37
|
var command = ""; // Our command to run
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
"serve": {},
|
|
41
|
-
"build": {}
|
|
42
|
-
};
|
|
39
|
+
|
|
43
40
|
|
|
44
41
|
// Get options from command args
|
|
45
42
|
for(x = 0; x < process.argv.length; x++)
|
|
@@ -50,9 +47,7 @@ for(x = 0; x < process.argv.length; x++)
|
|
|
50
47
|
// Third argument is command
|
|
51
48
|
if(x == 2) {
|
|
52
49
|
command = process.argv[x];
|
|
53
|
-
|
|
54
|
-
if(commands[command] === undefined)
|
|
55
|
-
throw "The specified command '" + command + "' is not known\r\n";
|
|
50
|
+
continue;
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
if(process.argv[x] == "-path") {
|
|
@@ -88,5 +83,12 @@ if(command == "serve") {
|
|
|
88
83
|
const stats = require(path.join(__dirname, "hdoc-stats.js"));
|
|
89
84
|
|
|
90
85
|
stats.run(ui_path, source_path, md);
|
|
86
|
+
} else if(command == "init") {
|
|
87
|
+
|
|
88
|
+
const init = require(path.join(__dirname, "hdoc-init.js"));
|
|
89
|
+
|
|
90
|
+
init.run(ui_path, source_path, md);
|
|
91
|
+
} else {
|
|
92
|
+
console.log("Unknown command: " + command);
|
|
91
93
|
}
|
|
92
94
|
|