Force higher (fixed) Panino; remove needless package.json
This commit is contained in:
parent
8298881fc0
commit
d32dfd3194
23 changed files with 72 additions and 70 deletions
|
|
@ -1,11 +1,27 @@
|
|||
# Introduction
|
||||
|
||||
The beginnings of an API documentation set for Ace.
|
||||
The API doc build takes a look a source Javascript files in the _lib_ directory, and turns it into HTML output in the _api_ directory. It uses [Panino](https://github.com/gjtorikian/panino-docs) to perform the conversion.
|
||||
|
||||
For any questions, please see that repo.
|
||||
|
||||
# Building
|
||||
|
||||
In this directory, just run
|
||||
In the root directory, just run:
|
||||
|
||||
node build.js [path_to_ndoc]
|
||||
make doc
|
||||
|
||||
`[path_to_ndoc]` is a required argument, indicating the location of your ndoc install, relative to the `build.js` file. By default, this will point to `./build/ndoc/bin/ndoc`.
|
||||
In this directory, just run:
|
||||
|
||||
node build.js
|
||||
|
||||
# Build File
|
||||
|
||||
Here's a breakdown of what the arguments in _build.js_ are doing:
|
||||
|
||||
`--path=srcPath`: The location of the Ace source
|
||||
`-o=../api/`: The location of the output
|
||||
`-a=./additionalObjs.json`: A list of URLs to use for "missing objects" that the documentation requires
|
||||
`-i=index.md`: The location of the Ace index/landing page
|
||||
`-t=Ace API`: The title of the documentation
|
||||
`--skin=./resources/ace/`: The location of all the templates and design
|
||||
`-s`: Choose to split each class into its own file
|
||||
|
|
@ -1,4 +1,23 @@
|
|||
{
|
||||
"Array" : "http://www.nodemanual.org/latest/js_doc/Array.html",
|
||||
"Boolean" : "http://www.nodemanual.org/latest/js_doc/Boolean.html",
|
||||
"Date" : "http://www.nodemanual.org/latest/js_doc/Date.html",
|
||||
"Error" : "http://www.nodemanual.org/latest/js_doc/Error.html",
|
||||
"EvalError" : "http://www.nodemanual.org/latest/js_doc/EvalError.html",
|
||||
"RangeError" : "http://www.nodemanual.org/latest/js_doc/RangeError.html",
|
||||
"ReferenceError" : "http://www.nodemanual.org/latest/js_doc/ReferenceError.html",
|
||||
"SyntaxError" : "http://www.nodemanual.org/latest/js_doc/SyntaxError.html",
|
||||
"TypeError" : "http://www.nodemanual.org/latest/js_doc/TypeError.html",
|
||||
"URIError" : "http://www.nodemanual.org/latest/js_doc/URIError.html",
|
||||
"Function" : "http://www.nodemanual.org/latest/js_doc/Function.html",
|
||||
"Infinity" : "http://www.nodemanual.org/latest/js_doc/Infinity.html",
|
||||
"JSON" : "http://www.nodemanual.org/latest/js_doc/JSON.html",
|
||||
"Math" : "http://www.nodemanual.org/latest/js_doc/Math.html",
|
||||
"NaN" : "http://www.nodemanual.org/latest/js_doc/NaN.html",
|
||||
"Number" : "http://www.nodemanual.org/latest/js_doc/Number.html",
|
||||
"Object" : "http://www.nodemanual.org/latest/js_doc/Object.html",
|
||||
"RegExp" : "http://www.nodemanual.org/latest/js_doc/RegExp.html",
|
||||
"String" : "http://www.nodemanual.org/latest/js_doc/String.html",
|
||||
"DOMElement": "https://developer.mozilla.org/en/DOM/element",
|
||||
"Event": "https://github.com/ajaxorg/ace/blob/master/lib/ace/lib/event.js",
|
||||
"TextMode": "https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/text.js",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ var panino = require("panino");
|
|||
|
||||
var srcPath = process.cwd() + "/../lib/ace";
|
||||
|
||||
panino.main(["--path=" + srcPath, "-o", "../api/", "-a", "./additionalObjs.json", "-i", "index.md", "-t", "Ace API", "--skin", "./resources/ace/"], function(err) {
|
||||
panino.main(["--path=" + srcPath, "-o", "../api/", "-a", "./additionalObjs.json", "-i", "index.md", "-t", "Ace API", "--skin", "./resources/ace/", "-s"], function(err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(-1);
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "ace_docs",
|
||||
"version": "0.0.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/ajaxorg/ace.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": "~0.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"panino" : "~1.0.12"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ mixin api()
|
|||
-var heading = obj.path
|
||||
span.name #{heading}
|
||||
span.editInC9
|
||||
mixin formatGHHref(obj.href, 'nodejs_ref_guide')
|
||||
mixin formatGHHref(obj.fullPath, 'nodejs_ref_guide')
|
||||
|
||||
-if (true || obj.filename.indexOf("index") < 0)
|
||||
ul(class='nav tabs pos#{pos}', data-tabs='tabs')
|
||||
|
|
@ -258,13 +258,7 @@ mixin links(collection)
|
|||
mixin link(obj)
|
||||
|
||||
mixin formatGHHref(url, type)
|
||||
url = url.substring(url.indexOf("src/") + 4)
|
||||
|
||||
if type == 'nodejs_ref_guide'
|
||||
url = url.substring(0, url.lastIndexOf("#"))
|
||||
url = 'src/' + url
|
||||
else if type == 'nodejs_dev_guide'
|
||||
url = 'src/' + url
|
||||
url = url.substring(url.indexOf("ace/lib"))
|
||||
|
||||
-url = url.replace(/\/{2,}/g, "/").replace(/\//g,"%2F")
|
||||
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git&file=#{url}&line_start=3&line_end=0' title='Edit in Cloud9 IDE'>[edit]</a>
|
||||
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git' title='Edit in Cloud9 IDE'>[edit]</a>
|
||||
|
|
@ -83,16 +83,4 @@ mixin identifyBuild(tree, type)
|
|||
-dirPrefix = './'
|
||||
|
||||
mixin markdown(text, inline)
|
||||
!= markdown(text, inline)
|
||||
|
||||
mixin formatGHHref(url, type)
|
||||
url = url.substring(url.indexOf("src/") + 4)
|
||||
|
||||
if type == 'nodejs_ref_guide'
|
||||
url = url.substring(0, url.lastIndexOf("#"))
|
||||
url = 'src/' + url
|
||||
else if type == 'nodejs_dev_guide'
|
||||
url = 'src/' + url
|
||||
|
||||
-url = url.replace(/\/{2,}/g, "/").replace(/\//g,"%2F")
|
||||
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%ace.git&file=#{url}&line_start=3&line_end=0' title='Edit in Cloud9 IDE'>[edit]</a>
|
||||
!= markdown(text, inline)
|
||||
Loading…
Add table
Add a link
Reference in a new issue