-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilter.js
More file actions
29 lines (24 loc) · 773 Bytes
/
Copy pathfilter.js
File metadata and controls
29 lines (24 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var main = require("./main"),
makeJSON = require("./makeJSON"),
makeHTML = require("./makeHTML"),
copy = require("./copyFile"),
path = require("path"),
fs = require("fs"),
params = process.argv,
modules;
var arg;
do arg = params.shift();
while (arg === "node" || __filename === fs.realpathSync('.') + "\\" + path.basename(arg))
arg && params.push(arg);
var setting = params[0] || "baseDoc.json";
var setObj = JSON.parse(fs.readFileSync(setting, "utf-8"));
//generate modules
modules = main.run(setObj);
if(modules && modules!="") {
//generate json
var json = makeJSON.make(modules);
//generate HTML
makeHTML.make(json, setObj["docLocation"]);
}else{
console.log("Generate fail, No useful annotation, You should check you annotation file\n");
}