mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Fixed up default template more, added static files.
This commit is contained in:
parent
d36955ccf8
commit
61e74dcd5f
@ -106,6 +106,42 @@
|
|||||||
return _allFiles;
|
return _allFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.copyFile = function(inFile, outDir, fileName) {
|
||||||
|
if (fileName == null) fileName = exports.toFile(inFile);
|
||||||
|
|
||||||
|
outDir = exports.toDir(outDir);
|
||||||
|
|
||||||
|
var inFile = new File(inFile);
|
||||||
|
var outFile = new File(outDir+slash+fileName);
|
||||||
|
|
||||||
|
var bis = new Packages.java.io.BufferedInputStream(new Packages.java.io.FileInputStream(inFile), 4096);
|
||||||
|
var bos = new Packages.java.io.BufferedOutputStream(new Packages.java.io.FileOutputStream(outFile), 4096);
|
||||||
|
var theChar;
|
||||||
|
while ((theChar = bis.read()) != -1) {
|
||||||
|
bos.write(theChar);
|
||||||
|
}
|
||||||
|
bos.close();
|
||||||
|
bis.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.toDir = function(path) {
|
||||||
|
var file = new File(path);
|
||||||
|
|
||||||
|
if (file.isDirectory()){
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
var parts = path.split(/[\\\/]/);
|
||||||
|
parts.pop();
|
||||||
|
|
||||||
|
return parts.join(slash);
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.toFile = function(path) {
|
||||||
|
var parts = path.split(/[\\\/]/);
|
||||||
|
return parts.pop();
|
||||||
|
}
|
||||||
|
|
||||||
exports.mkPath = function(/**Array*/ path) {
|
exports.mkPath = function(/**Array*/ path) {
|
||||||
if (path.constructor != Array) path = path.split(/[\\\/]/);
|
if (path.constructor != Array) path = path.split(/[\\\/]/);
|
||||||
var make = "";
|
var make = "";
|
||||||
@ -118,8 +154,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.makeDir = function(/**string*/ path) {
|
exports.makeDir = function(/**string*/ path) {
|
||||||
(new File(path)).mkdir();
|
var dirPath = (exports.toDir(path));
|
||||||
},
|
(new File(dirPath)).mkdir();
|
||||||
|
}
|
||||||
|
|
||||||
// fix multiple slashes, like one//two
|
// fix multiple slashes, like one//two
|
||||||
function fixSlash(path) {
|
function fixSlash(path) {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
@module jsdoc/src/parser
|
* @module jsdoc/src/parser
|
||||||
@requires module:common/util
|
* @requires common/util
|
||||||
@requires module:common/fs
|
* @requires common/fs
|
||||||
@requires module:common/events
|
* @requires common/events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
@ -11,24 +11,31 @@
|
|||||||
currentSourceName = '';
|
currentSourceName = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@constructor module:jsdoc/src/parser.Parser
|
* @class
|
||||||
@mixes module:common/events
|
* @mixes module:common/events
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* var jsdocParser = new (require('jsdoc/src/parser').Parser)();
|
||||||
*/
|
*/
|
||||||
var Parser = exports.Parser = function() {
|
exports.Parser = function() {
|
||||||
this._resultBuffer = [];
|
this._resultBuffer = [];
|
||||||
this.refs = {};
|
this.refs = {};
|
||||||
}
|
}
|
||||||
require('common/util').mixin(Parser.prototype, require('common/events'));
|
require('common/util').mixin(exports.Parser.prototype, require('common/events'));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@method module:jsdoc/src/parser.Parser#parse
|
* @param {Array<string>} sourceFiles
|
||||||
@param {Array<string>} sourceFiles
|
* @param {string} [encoding=utf8]
|
||||||
@param {string} [encoding=utf8]
|
*
|
||||||
@fires jsdocCommentFound
|
* @fires jsdocCommentFound
|
||||||
@fires symbolFound
|
* @fires symbolFound
|
||||||
@fires newDoclet
|
* @fires newDoclet
|
||||||
@fires fileBegin
|
* @fires fileBegin
|
||||||
@fires fileComplete
|
* @fires fileComplete
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* var myFiles = ['file1.js', 'file2.js'];
|
||||||
|
* var docs = jsdocParser.parse(myFiles);
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.parse = function(sourceFiles, encoding) {
|
exports.Parser.prototype.parse = function(sourceFiles, encoding) {
|
||||||
const SCHEMA = 'javascript:';
|
const SCHEMA = 'javascript:';
|
||||||
@ -62,23 +69,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@method module:jsdoc/src/parser.Parser#results
|
* @returns {Array<Doclet>} The accumulated results of any calls to parse.
|
||||||
@returns {Array<Doclet>} The accumulated results of any calls to parse.
|
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.results = function() {
|
exports.Parser.prototype.results = function() {
|
||||||
return this._resultBuffer;
|
return this._resultBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@method module:jsdoc/src/parser.Parser#addResult
|
* @param {Object} The parse result to add to the result buffer.
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.addResult = function(o) {
|
exports.Parser.prototype.addResult = function(o) {
|
||||||
this._resultBuffer.push(o);
|
this._resultBuffer.push(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Empty any accumulated results of calls to parse.
|
* Empty any accumulated results of calls to parse.
|
||||||
@method module:jsdoc/src/parser.Parser#clear
|
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.clear = function() {
|
exports.Parser.prototype.clear = function() {
|
||||||
currentParser = null;
|
currentParser = null;
|
||||||
@ -86,9 +91,7 @@
|
|||||||
this._resultBuffer = [];
|
this._resultBuffer = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @private */
|
||||||
@private
|
|
||||||
*/
|
|
||||||
exports.Parser.prototype._parseSourceCode = function(sourceCode, sourceName) {
|
exports.Parser.prototype._parseSourceCode = function(sourceCode, sourceName) {
|
||||||
currentSourceName = sourceName;
|
currentSourceName = sourceName;
|
||||||
|
|
||||||
@ -114,14 +117,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Given a node, determine what the node is a member of.
|
* Given a node, determine what the node is a member of.
|
||||||
|
* @param {astnode} node
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.astnodeToMemberof = function(astnode) {
|
exports.Parser.prototype.astnodeToMemberof = function(node) {
|
||||||
var memberof = {};
|
var memberof = {};
|
||||||
|
|
||||||
if (astnode.type === Token.VAR || astnode.type === Token.FUNCTION) {
|
if (node.type === Token.VAR || node.type === Token.FUNCTION) {
|
||||||
if (astnode.enclosingFunction) { // an inner var or func
|
if (node.enclosingFunction) { // an inner var or func
|
||||||
memberof.id = 'astnode'+astnode.enclosingFunction.hashCode();
|
memberof.id = 'astnode'+node.enclosingFunction.hashCode();
|
||||||
memberof.doclet = this.refs[memberof.id];
|
memberof.doclet = this.refs[memberof.id];
|
||||||
if (!memberof.doclet) {
|
if (!memberof.doclet) {
|
||||||
return '<anonymous>~';
|
return '<anonymous>~';
|
||||||
@ -130,7 +134,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
memberof.id = 'astnode'+astnode.parent.hashCode();
|
memberof.id = 'astnode'+node.parent.hashCode();
|
||||||
memberof.doclet = this.refs[memberof.id];
|
memberof.doclet = this.refs[memberof.id];
|
||||||
if (!memberof.doclet) return ''; // global?
|
if (!memberof.doclet) return ''; // global?
|
||||||
return memberof.doclet.longname||memberof.doclet.name;
|
return memberof.doclet.longname||memberof.doclet.name;
|
||||||
@ -138,7 +142,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Resolve what "this" refers too, relative to a node
|
* Resolve what "this" refers too, relative to a node.
|
||||||
|
* @param {astnode} node - The "this" node
|
||||||
|
* @returns {string} The longname of the enclosing node.
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.resolveThis = function(node) {
|
exports.Parser.prototype.resolveThis = function(node) {
|
||||||
var memberof = {};
|
var memberof = {};
|
||||||
@ -186,9 +192,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Resolve what function a var is limited to.
|
* Resolve what function a var is limited to.
|
||||||
@param {astnode} node
|
* @param {astnode} node
|
||||||
@param {string} basename The leftmost name in the long name: in foo.bar.zip the basename is foo.
|
* @param {string} basename The leftmost name in the long name: in foo.bar.zip the basename is foo.
|
||||||
*/
|
*/
|
||||||
exports.Parser.prototype.resolveVar = function(node, basename) {
|
exports.Parser.prototype.resolveVar = function(node, basename) {
|
||||||
var doclet,
|
var doclet,
|
||||||
@ -205,9 +211,7 @@
|
|||||||
return this.resolveVar(enclosingFunction, basename);
|
return this.resolveVar(enclosingFunction, basename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @private */
|
||||||
@private
|
|
||||||
*/
|
|
||||||
function visitNode(node) {
|
function visitNode(node) {
|
||||||
var e,
|
var e,
|
||||||
commentSrc;
|
commentSrc;
|
||||||
@ -312,7 +316,7 @@
|
|||||||
currentParser.refs['astnode'+e.code.node.hashCode()] = e.doclet; // allow lookup from value => doclet
|
currentParser.refs['astnode'+e.code.node.hashCode()] = e.doclet; // allow lookup from value => doclet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (node.type == Token.FUNCTION/* && String(node.name) !== ''*/) {
|
else if (node.type == Token.FUNCTION) {
|
||||||
e = {
|
e = {
|
||||||
id: 'astnode'+node.hashCode(), // the id of the COLON node
|
id: 'astnode'+node.hashCode(), // the id of the COLON node
|
||||||
comment: String(node.jsDoc||'@undocumented'),
|
comment: String(node.jsDoc||'@undocumented'),
|
||||||
@ -329,12 +333,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e.doclet) {
|
if (e.doclet) {
|
||||||
//dump(e.code.node.hashCode(), e.code, e.code.node.enclosingFunction? e.code.node.enclosingFunction.hashCode() : 'global')
|
|
||||||
currentParser.refs['astnode'+e.code.node.hashCode()] = e.doclet; // allow lookup from value => doclet
|
currentParser.refs['astnode'+e.code.node.hashCode()] = e.doclet; // allow lookup from value => doclet
|
||||||
}
|
}
|
||||||
else if (!currentParser.refs['astnode'+e.code.node.hashCode()]) { // keep references to undocumented anonymous functions too as they might have scoped vars
|
else if (!currentParser.refs['astnode'+e.code.node.hashCode()]) { // keep references to undocumented anonymous functions too as they might have scoped vars
|
||||||
currentParser.refs['astnode'+e.code.node.hashCode()] = {
|
currentParser.refs['astnode'+e.code.node.hashCode()] = {
|
||||||
//name: '<anonymous>',
|
|
||||||
longname: '<anonymous>',
|
longname: '<anonymous>',
|
||||||
meta: { code: e.code }
|
meta: { code: e.code }
|
||||||
};
|
};
|
||||||
@ -344,9 +346,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @private */
|
||||||
@private
|
|
||||||
*/
|
|
||||||
function parserFactory() {
|
function parserFactory() {
|
||||||
var cx = Packages.org.mozilla.javascript.Context.getCurrentContext();
|
var cx = Packages.org.mozilla.javascript.Context.getCurrentContext();
|
||||||
|
|
||||||
@ -360,8 +360,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Attempts to find the name and type of the given node.
|
* Attempts to find the name and type of the given node.
|
||||||
@private
|
* @private
|
||||||
*/
|
*/
|
||||||
function aboutNode(node) {
|
function aboutNode(node) {
|
||||||
about = {};
|
about = {};
|
||||||
@ -408,9 +408,7 @@
|
|||||||
return about;
|
return about;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @private */
|
||||||
@private
|
|
||||||
*/
|
|
||||||
function nodeToString(node) {
|
function nodeToString(node) {
|
||||||
var str;
|
var str;
|
||||||
|
|
||||||
@ -444,9 +442,7 @@
|
|||||||
return '' + str;
|
return '' + str;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** @private */
|
||||||
@private
|
|
||||||
*/
|
|
||||||
function getTypeName(node) {
|
function getTypeName(node) {
|
||||||
var type = '';
|
var type = '';
|
||||||
|
|
||||||
@ -457,9 +453,7 @@
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** @private */
|
||||||
@private
|
|
||||||
*/
|
|
||||||
function isValidJsdoc(commentSrc) {
|
function isValidJsdoc(commentSrc) {
|
||||||
return commentSrc.indexOf('/***') !== 0; /*** ignore comments that start with many stars ***/
|
return commentSrc.indexOf('/***') !== 0; /*** ignore comments that start with many stars ***/
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "jsdoc",
|
"name": "jsdoc",
|
||||||
"version": "3.0.0beta1",
|
"version": "3.0.0beta1",
|
||||||
"revision": "2011-02-08-2004",
|
"revision": "2011-02-11-2113",
|
||||||
"description": "An automatic documentation generator for javascript.",
|
"description": "An automatic documentation generator for javascript.",
|
||||||
"keywords": [ "documentation", "javascript" ],
|
"keywords": [ "documentation", "javascript" ],
|
||||||
"licenses": [
|
"licenses": [
|
||||||
|
|||||||
@ -53,6 +53,7 @@
|
|||||||
doclet.hasReturns = doclet.returns && doclet.returns.length > 0;
|
doclet.hasReturns = doclet.returns && doclet.returns.length > 0;
|
||||||
doclet.hasBorrowed = doclet.borrowed && doclet.borrowed.length > 0;
|
doclet.hasBorrowed = doclet.borrowed && doclet.borrowed.length > 0;
|
||||||
doclet.hasExceptions = doclet.exceptions && doclet.exceptions.length > 0;
|
doclet.hasExceptions = doclet.exceptions && doclet.exceptions.length > 0;
|
||||||
|
doclet.hasExamples = doclet.examples && doclet.examples.length > 0;
|
||||||
|
|
||||||
summarize(doclet);
|
summarize(doclet);
|
||||||
});
|
});
|
||||||
@ -65,6 +66,7 @@
|
|||||||
returnsTemplate: fs.read(BASEDIR + 'templates/default/tmpl/returns.mustache'),
|
returnsTemplate: fs.read(BASEDIR + 'templates/default/tmpl/returns.mustache'),
|
||||||
methodsTemplate: fs.read(BASEDIR + 'templates/default/tmpl/methods.mustache'),
|
methodsTemplate: fs.read(BASEDIR + 'templates/default/tmpl/methods.mustache'),
|
||||||
propertiesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/properties.mustache'),
|
propertiesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/properties.mustache'),
|
||||||
|
examplesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/example.mustache'),
|
||||||
namespacesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/namespaces.mustache'),
|
namespacesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/namespaces.mustache'),
|
||||||
|
|
||||||
classesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/classes.mustache'),
|
classesTemplate: fs.read(BASEDIR + 'templates/default/tmpl/classes.mustache'),
|
||||||
@ -167,6 +169,17 @@
|
|||||||
}
|
}
|
||||||
fs.mkPath(outdir);
|
fs.mkPath(outdir);
|
||||||
|
|
||||||
|
// copy static files to outdir
|
||||||
|
var fromDir = BASEDIR + 'templates/default/static',
|
||||||
|
staticFiles = fs.ls(fromDir, 3);
|
||||||
|
staticFiles.forEach(function(fileName) {
|
||||||
|
var toDir = fs.toDir(fileName.replace(fromDir, outdir));
|
||||||
|
fs.mkPath(toDir);
|
||||||
|
fs.copyFile(fileName, toDir);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// containers
|
// containers
|
||||||
generate('Modules', modules, 'modules.html');
|
generate('Modules', modules, 'modules.html');
|
||||||
generate('Classes', classes, 'classes.html');
|
generate('Classes', classes, 'classes.html');
|
||||||
|
|||||||
233
templates/default/static/styles/jsdoc-default.css
Normal file
233
templates/default/static/styles/jsdoc-default.css
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
.kind { font-style: italic; }
|
||||||
|
|
||||||
|
.constructor, .mixin, .namespace
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
color: #780000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property { color: #666; }
|
||||||
|
.function { color: #666; }
|
||||||
|
.access { color: #666; }
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6
|
||||||
|
{
|
||||||
|
font-family: "Bitstream Vera Sans", "DejaVu Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans serif;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title
|
||||||
|
{
|
||||||
|
font-family: "Bitstream Vera Sans", "DejaVu Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans serif;
|
||||||
|
font-size: 3.5em;
|
||||||
|
font-weight: bolder;
|
||||||
|
margin: 0 0 0.1em;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title
|
||||||
|
{
|
||||||
|
font-size: 2.5em;
|
||||||
|
margin: 0;
|
||||||
|
color: #798D3E;
|
||||||
|
}
|
||||||
|
|
||||||
|
section
|
||||||
|
{
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 15px;
|
||||||
|
-moz-border-radius: 8px;
|
||||||
|
display: block;
|
||||||
|
padding: 0.75em 0.5em 0.5em 1em;
|
||||||
|
margin: 0.5em 0.5em 1em 1em;
|
||||||
|
background-color: #fff;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subsection-title
|
||||||
|
{
|
||||||
|
font-size: 1.9em;
|
||||||
|
margin: 0.5em 0 1em;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.method-title, .class-title
|
||||||
|
{
|
||||||
|
font-size: 1.7em;
|
||||||
|
margin: 0 0 1em 1em;
|
||||||
|
color: #7B1A3F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-list { list-style-type: none; }
|
||||||
|
|
||||||
|
html
|
||||||
|
{
|
||||||
|
/* stops IE resizing fonts by a massive amount */
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body
|
||||||
|
{
|
||||||
|
/* fixes monospace font sizes in webkit */
|
||||||
|
/* following line is picked up by IE6 & 7, which cannot resize pixel-based font sizes */
|
||||||
|
*font-size: 62.5%;
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-family: verdana, sans-serif;
|
||||||
|
/*overflow: hidden;*/
|
||||||
|
zoom: 1;
|
||||||
|
/*background: url(images/pagebg.png) 0 73px repeat-x;*/
|
||||||
|
color: #eee;
|
||||||
|
background-color: #22252a;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link, a:visited
|
||||||
|
{
|
||||||
|
color: #356a8b;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 1px dotted #356a8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover, a:active
|
||||||
|
{
|
||||||
|
color: #298FB2;
|
||||||
|
border-color: #298FB2;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.image { border: 0; }
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
margin: 0 0 1em 0;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
code { font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
|
||||||
|
|
||||||
|
dl.params dt
|
||||||
|
{
|
||||||
|
border-top: 1px solid #b2b1b1;
|
||||||
|
color: #298FB2;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-top: 8px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-size: 1.1em;
|
||||||
|
float: none;
|
||||||
|
overflow: visible;
|
||||||
|
zoom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.params dt.first
|
||||||
|
{
|
||||||
|
border-top: none;
|
||||||
|
padding-top: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.params dd
|
||||||
|
{
|
||||||
|
border-width: 0;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.param-properties
|
||||||
|
{
|
||||||
|
font-style: italic;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
font-size: 0.9em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.param-properties dt span,
|
||||||
|
dl.param-properties dd
|
||||||
|
{
|
||||||
|
color: #555;
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: inline;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-size: 1em;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.param-properties dt
|
||||||
|
{
|
||||||
|
clear: both;
|
||||||
|
display: inline;
|
||||||
|
font-size: 1em;
|
||||||
|
padding: 0;
|
||||||
|
float: none;
|
||||||
|
overflow: visible;
|
||||||
|
zoom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.param-properties dt span
|
||||||
|
{
|
||||||
|
width: 85px;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-docs
|
||||||
|
{
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: lighter;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property { margin-left: 30px; }
|
||||||
|
|
||||||
|
.property-head
|
||||||
|
{
|
||||||
|
margin-left: -20px;
|
||||||
|
display: block;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property-name
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 10px 0 0;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: #4782B5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property-summary
|
||||||
|
{
|
||||||
|
color: #999;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property-details
|
||||||
|
{
|
||||||
|
clear: both;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property-details dt
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
padding-left: 10px;
|
||||||
|
clear: left;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.property-details dd { padding-left: 60px; }
|
||||||
|
.property-deprecated { text-decoration: line-through; }
|
||||||
|
|
||||||
|
.example-code
|
||||||
|
{
|
||||||
|
padding: 2px 2px 2px 10px;
|
||||||
|
margin-right: 24px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #444;
|
||||||
|
border-radius: 2px;
|
||||||
|
-moz-border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yesDef { text-indent: -5000px; }
|
||||||
26
templates/default/static/styles/node-dark.css
Normal file
26
templates/default/static/styles/node-dark.css
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
.sh_sourceCode {
|
||||||
|
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sh_sourceCode .sh_symbol , .sh_sourceCode .sh_cbracket {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sh_sourceCode .sh_keyword
|
||||||
|
{
|
||||||
|
font-style: italic;
|
||||||
|
color: #ECDDAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number,
|
||||||
|
.sh_sourceCode .sh_specialchar
|
||||||
|
{
|
||||||
|
color: #B0C4DE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sh_sourceCode .sh_comment {
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
@ -4,244 +4,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>JSDoc: {{title}}</title>
|
<title>JSDoc: {{title}}</title>
|
||||||
<style type="text/css">
|
|
||||||
.kind { font-style: italic; }
|
<script src="http://shjs.sourceforge.net/sh_main.min.js"> </script>
|
||||||
.constructor, .mixin, .namespace
|
<script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"> </script>
|
||||||
{
|
<link type="text/css" rel="stylesheet" href="styles/node-dark.css">
|
||||||
font-weight: bold;
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
color: #780000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.property { color: #666; }
|
|
||||||
.function { color: #666; }
|
|
||||||
|
|
||||||
.access { color: #666; }
|
|
||||||
/*
|
|
||||||
.symbol-head
|
|
||||||
{
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
padding: 6px;
|
|
||||||
font-size: 110%;
|
|
||||||
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif;
|
|
||||||
background-color: #B8B9CB;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.symbol-head .summary {
|
|
||||||
font-style: italic;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
.description {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
.page-title
|
|
||||||
{
|
|
||||||
font-family: "Bitstream Vera Sans", "DejaVu Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans serif;
|
|
||||||
font-size: 3.5em;
|
|
||||||
font-weight: bolder;
|
|
||||||
margin: 0 0 0.1em;
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-title
|
|
||||||
{
|
|
||||||
font-size: 2.5em;
|
|
||||||
margin: 0;
|
|
||||||
color: #798D3E;
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 15px;
|
|
||||||
-moz-border-radius: 8px;
|
|
||||||
display: block;
|
|
||||||
padding: 0.75em 0.5em 0.5em 1em;
|
|
||||||
margin: 0.5em 0.5em 1em 1em;
|
|
||||||
background-color: #fff;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subsection-title {
|
|
||||||
font-size: 1.9em;
|
|
||||||
margin: 0.5em 0 1em;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.method-title, .class-title
|
|
||||||
{
|
|
||||||
font-size: 1.7em;
|
|
||||||
margin: 0 0 1em 1em;
|
|
||||||
color: #7B1A3F;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-list {
|
|
||||||
list-style-type:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
/* stops IE resizing fonts by a massive amount */
|
|
||||||
font-size: 100%
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
font-family: Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans serif;
|
|
||||||
/* fixes monospace font sizes in webkit */
|
|
||||||
font-size: 11px;
|
|
||||||
/* following line is picked up by IE6 & 7, which cannot resize pixel-based font sizes */
|
|
||||||
*font-size: 62.5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-size: 0.8em;
|
|
||||||
font-family: verdana, sans-serif;
|
|
||||||
/*overflow: hidden;*/
|
|
||||||
zoom: 1;
|
|
||||||
/*background: url(images/pagebg.png) 0 73px repeat-x;*/
|
|
||||||
color: #fff;
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
a:link, a:visited {
|
|
||||||
color: #356a8b;
|
|
||||||
text-decoration: none;
|
|
||||||
border-bottom: 1px dotted #356a8b;
|
|
||||||
}
|
|
||||||
a:hover, a:active {
|
|
||||||
color: #298FB2;
|
|
||||||
border-color: #298FB2;
|
|
||||||
border-bottom-style: solid;
|
|
||||||
}
|
|
||||||
a.image {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0 0 1em 0;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl.params dt {
|
|
||||||
border-top: 1px solid #b2b1b1;
|
|
||||||
color: #298FB2;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-top: 8px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-size: 1.1em;
|
|
||||||
float: none;
|
|
||||||
overflow: visible;
|
|
||||||
zoom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl.params dt.first {
|
|
||||||
border-top: none;
|
|
||||||
padding-top: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl.params dd {
|
|
||||||
border-width: 0;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl.param-properties {
|
|
||||||
font-style: italic;
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
font-size: 0.9em;
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
dl.param-properties dt span,
|
|
||||||
dl.param-properties dd {
|
|
||||||
color: #555;
|
|
||||||
float: left;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: inline;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-size: 1em;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
dl.param-properties dt {
|
|
||||||
clear: both;
|
|
||||||
display: inline;
|
|
||||||
font-size: 1em;
|
|
||||||
padding: 0;
|
|
||||||
float: none;
|
|
||||||
overflow: visible;
|
|
||||||
zoom: 0;
|
|
||||||
}
|
|
||||||
dl.param-properties dt span {
|
|
||||||
width: 85px;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.no-docs {
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: lighter;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.property {
|
|
||||||
margin-left: 30px;
|
|
||||||
}
|
|
||||||
.property-head {
|
|
||||||
margin-left: -20px;
|
|
||||||
display: block;
|
|
||||||
line-height: 1.2em;
|
|
||||||
}
|
|
||||||
.property-name {
|
|
||||||
float: left;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0 10px 0 0;
|
|
||||||
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1.2em;
|
|
||||||
color: #4782B5;
|
|
||||||
}
|
|
||||||
.property-summary {
|
|
||||||
color: #999;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
.property-details {
|
|
||||||
clear: both;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.property-details dt {
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
padding-left: 10px;
|
|
||||||
clear: left;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.property-details dd {
|
|
||||||
padding-left: 60px;
|
|
||||||
}
|
|
||||||
.property-deprecated {
|
|
||||||
text-decoration: line-through;
|
|
||||||
}
|
|
||||||
|
|
||||||
.example-code {
|
|
||||||
border: 1px solid #999;
|
|
||||||
padding: 2px 2px 2px 8px;
|
|
||||||
margin-right: 24px;
|
|
||||||
background-color: #FFFDE1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.yesDef {
|
|
||||||
text-indent: -5000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -308,5 +77,6 @@
|
|||||||
</section>
|
</section>
|
||||||
{{/docs}}
|
{{/docs}}
|
||||||
|
|
||||||
|
<script> sh_highlightDocument(); </script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
12
templates/default/tmpl/example.mustache
Normal file
12
templates/default/tmpl/example.mustache
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<dt>
|
||||||
|
<h5>Example</h5>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
{{#examples}}
|
||||||
|
<br clear="both">
|
||||||
|
<div class="example-code">
|
||||||
|
<pre class="sh_javascript"><code>{{.}}</code></pre>
|
||||||
|
</div>
|
||||||
|
<br clear="both">
|
||||||
|
{{/examples}}
|
||||||
|
</dd>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<div class="apiFurtherDetail" style="height: auto;">
|
<div class="apiFurtherDetail" style="height: auto;">
|
||||||
|
|
||||||
<h5>Synopsis:</h5>
|
<h5>Synopsis:</h5>
|
||||||
<pre class="prettyprint"><code>{{synopsis}}</code></pre>
|
<pre class="synopsis"><code>{{synopsis}}</code></pre>
|
||||||
|
|
||||||
{{#hasParams}}
|
{{#hasParams}}
|
||||||
<h5>Parameters:</h5>
|
<h5>Parameters:</h5>
|
||||||
@ -24,6 +24,10 @@
|
|||||||
<h5>Returns:</h5>
|
<h5>Returns:</h5>
|
||||||
{{>returnsTemplate}}
|
{{>returnsTemplate}}
|
||||||
{{/hasReturns}}
|
{{/hasReturns}}
|
||||||
|
|
||||||
|
{{#hasExamples}}
|
||||||
|
{{>examplesTemplate}}
|
||||||
|
{{/hasExamples}}
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
|||||||
@ -81,17 +81,8 @@
|
|||||||
</dd>
|
</dd>
|
||||||
{{/defaultvalue}}
|
{{/defaultvalue}}
|
||||||
|
|
||||||
{{#examples}}
|
{{#hasExamples}}
|
||||||
<dt>
|
{{>examplesTemplate}}
|
||||||
Example
|
{{/hasExamples}
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
<br clear="both">
|
|
||||||
<div class="example-code">
|
|
||||||
<pre class="prettyprint lang-js"><code>{{.}}</code></pre>
|
|
||||||
</div>
|
|
||||||
<br clear="both">
|
|
||||||
</dd>
|
|
||||||
{{/examples}}
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
Loading…
x
Reference in New Issue
Block a user