Skip to content

Commit 56d2c29

Browse files
committed
Make API docs generator aware of olcsx.js
1 parent ac54ca4 commit 56d2c29

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

build/jsdoc/api/conf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"includePattern": ".+\\.js(doc)?$",
1111
"excludePattern": "(^|\\/|\\\\)_",
1212
"include": [
13-
"src"
13+
"src",
14+
"externs"
1415
]
1516
},
1617
"plugins": [

build/jsdoc/api/plugins/typedefs.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/*
2-
* Converts olx.js @type annotations into properties of the previous @typedef.
2+
* Converts olcsx.js @type annotations into properties of the previous @typedef.
33
* Changes @enum annotations into @typedef.
44
*/
55

6-
var lastOlxTypedef = null;
7-
var olxTypes = {};
6+
var lastOlcsxTypedef = null;
7+
var olcsxTypes = {};
88

99
function addSubparams(params) {
1010
for (var j = 0, jj = params.length; j < jj; ++j) {
1111
var param = params[j];
1212
var types = param.type.names;
1313
for (var k = 0, kk = types.length; k < kk; ++k) {
1414
var name = types[k];
15-
if (name in olxTypes) {
16-
param.subparams = olxTypes[name];
15+
if (name in olcsxTypes) {
16+
param.subparams = olcsxTypes[name];
1717
// TODO addSubparams(param.subparams);
1818
// TODO Do we need to support multiple object literal types per
1919
// param?
@@ -27,20 +27,20 @@ exports.handlers = {
2727

2828
newDoclet: function(e) {
2929
var doclet = e.doclet;
30-
if (doclet.meta.filename == 'olx.js') {
30+
if (doclet.meta.filename == 'olcsx.js') {
3131
// do nothing if not marked @api
3232
if (!doclet.stability) {
3333
return;
3434
}
3535
if (doclet.kind == 'typedef') {
36-
lastOlxTypedef = doclet;
37-
olxTypes[doclet.longname] = [];
36+
lastOlcsxTypedef = doclet;
37+
olcsxTypes[doclet.longname] = [];
3838
doclet.properties = [];
39-
} else if (lastOlxTypedef && doclet.memberof == lastOlxTypedef.longname) {
40-
lastOlxTypedef.properties.push(doclet);
41-
olxTypes[lastOlxTypedef.longname].push(doclet);
39+
} else if (lastOlcsxTypedef && doclet.memberof == lastOlcsxTypedef.longname) {
40+
lastOlcsxTypedef.properties.push(doclet);
41+
olcsxTypes[lastOlcsxTypedef.longname].push(doclet);
4242
} else {
43-
lastOlxTypedef = null;
43+
lastOlcsxTypedef = null;
4444
}
4545
} else if (doclet.isEnum) {
4646
// We never export enums, so we document them like typedefs

0 commit comments

Comments
 (0)