Update to new panino, fix doc bugs
This commit is contained in:
parent
5e1c1457d6
commit
1846f3c9ba
29 changed files with 1055 additions and 17529 deletions
38
doc/build.js
38
doc/build.js
|
|
@ -1,10 +1,38 @@
|
|||
var path = require("path");
|
||||
|
||||
var panino = require("panino");
|
||||
|
||||
var srcPath = process.cwd() + "/../lib/ace";
|
||||
var srcPath = __dirname + "/../lib/ace";
|
||||
|
||||
panino.main(["--path=" + srcPath, "-o", "../api/", "-u", "../api/resources", "-a", "./additionalObjs.json", "-i", "index.md", "-t", "Ace API", "--skin", "./resources/ace/", "-s"], function(err) {
|
||||
var buildOptions = {
|
||||
parseOptions: "./parseOptions.json",
|
||||
additionalObjs: "./additionalObjs.json"
|
||||
}
|
||||
|
||||
var options = {
|
||||
title : "Ace API",
|
||||
linkFormat : 'http://example.com/{file}#{line}',
|
||||
output : "../api/",
|
||||
outputAssets : "../api/resources",
|
||||
skin : "./resources/ace/templates/layout.jade",
|
||||
assets : "./resources/ace/skeleton",
|
||||
additionalObjs : "./additionalObjs.json",
|
||||
exclude : ["**/*_test.js", "**/mode/**", "**/test/**", "**/theme/**", "**/worker/**"],
|
||||
index : "./index.md"
|
||||
};
|
||||
|
||||
files = [srcPath];
|
||||
|
||||
panino.parse(files, options, function (err, ast) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
panino.render('html', ast, options, function (err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(-1);
|
||||
}
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ace-api",
|
||||
"version": "0.0.0",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"panino" : ">=1.0.15"
|
||||
"panino" : ">=2.0.1"
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ html(xmlns="http://www.w3.org/1999/xhtml")
|
|||
.span9#mainContent
|
||||
#documentation
|
||||
-if (isIndex)
|
||||
mixin markdown(indexContent)
|
||||
!= content
|
||||
-else
|
||||
mixin api()
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ mixin api()
|
|||
-var heading = obj.path
|
||||
span.name #{heading}
|
||||
span.editInC9
|
||||
mixin formatGHHref(obj.fullPath, 'nodejs_ref_guide')
|
||||
mixin formatGHHref(obj.href, 'nodejs_ref_guide')
|
||||
|
||||
-if (true || obj.filename.indexOf("index") < 0)
|
||||
ul(class='nav tabs pos#{pos}', data-tabs='tabs')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue