Skip to content

Commit ee13c5c

Browse files
committed
优化jsdoc模板。增加namespace
1 parent c24c3d5 commit ee13c5c

File tree

10 files changed

+33
-24
lines changed

10 files changed

+33
-24
lines changed

build/jsdocs/classic/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"src/classic/libs","src/classic/theme","src/classic/resource"
2525
]
2626
},
27-
"plugins": ["plugins/markdown","../plugins/linkdoc"],
27+
"plugins": ["plugins/markdown"],
2828
"templates": {
2929
"cleverLinks": false,
3030
"monospaceLinks": false,

build/jsdocs/leaflet/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
]
2525

2626
},
27-
"plugins": ["plugins/markdown","../plugins/factoryFunction","../plugins/linkdoc"],
27+
"plugins": ["plugins/markdown","../plugins/factoryFunction"],
2828
"templates": {
2929
"cleverLinks": true,
3030
"monospaceLinks": true,

build/jsdocs/mapboxgl/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"src/common","src/mapboxgl"
2323
]
2424
},
25-
"plugins": ["plugins/markdown","../plugins/linkdoc"],
25+
"plugins": ["plugins/markdown"],
2626
"templates": {
2727
"cleverLinks": false,
2828
"monospaceLinks": false,

build/jsdocs/openlayers/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"src/common","src/openlayers"
2323
]
2424
},
25-
"plugins": ["plugins/markdown","../plugins/linkdoc"],
25+
"plugins": ["plugins/markdown"],
2626
"templates": {
2727
"cleverLinks": false,
2828
"monospaceLinks": false,

build/jsdocs/template/publish.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var template = require('jsdoc/template'),
1212
_ = require('underscore'),
1313
htmlsafe = helper.htmlsafe,
1414
linkto = helper.linkto,
15+
registerLink = helper.registerLink,
1516
resolveAuthorLinks = helper.resolveAuthorLinks,
1617
scopeToPunc = helper.scopeToPunc,
1718
hasOwnProp = Object.prototype.hasOwnProperty,
@@ -20,7 +21,6 @@ var template = require('jsdoc/template'),
2021
language,
2122
outdir = env.opts.destination;
2223
var util = require('util');
23-
2424
function find(spec) {
2525
return helper.find(data, spec);
2626
}
@@ -511,20 +511,14 @@ exports.publish = function (taffyData, opts, tutorials) {
511511
doclet.kind = 'member';
512512
}
513513
});
514-
514+
for (const typeLink in view.typeLinks) {
515+
registerLink(typeLink, view.typeLinks[typeLink]);
516+
}
515517
var members = helper.getMembers(data);
516518
members.tutorials = tutorials.children;
517-
var extendLinkto = function (longname, linkText, cssClass, fragmentId) {
518-
if (longname && view.typeLinks && view.typeLinks[longname]) {
519-
linkText = longname;
520-
longname = view.typeLinks[longname];
521-
}
522-
return linkto(longname, linkText, cssClass, fragmentId);
523-
524-
}
525519
// add template helpers
526520
view.find = find;
527-
view.linkto = extendLinkto;
521+
view.linkto = linkto;
528522
view.resolveAuthorLinks = resolveAuthorLinks;
529523
view.tutoriallink = tutoriallink;
530524
view.htmlsafe = htmlsafe;

build/jsdocs/template/tmpl/container.tmpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,10 @@
1212
<section>
1313

1414
<header>
15-
<h2><?js if (doc.ancestors && doc.ancestors.length) { ?>
16-
<span class="ancestors"><?js= doc.ancestors.join('') ?></span>
17-
<?js } ?>
18-
<?js= doc.name ?>
15+
<h2><?js if (doc.ancestors && doc.ancestors.length) { ?><span class="ancestors"><?js= doc.ancestors.join('') ?><?js } ?></span><?js= doc.name ?>
1916
<?js if (doc.variation) { ?>
2017
<sup class="variation"><?js= doc.variation ?></sup>
2118
<?js } ?>
22-
<span class="static">static</span>
2319
</h2>
2420
<?js if (doc.classdesc) { ?>
2521
<div class="class-description"><?js= doc.classdesc ?></div>

src/common/overlay/levelRenderer/LevelRenderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {Util} from '../../commontypes/Util';
33
import {Render} from './Render';
44

55
/**
6-
* @private
76
* @class SuperMap.LevelRenderer
87
* @category Visualization Theme
98
* @classdesc LevelRenderer 渲染器

src/leaflet/core/Base.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
/**
2-
*SuperMap Leaflet基类
2+
* @namespace L
3+
*/
4+
/**
5+
* @namespace L.supermap
6+
*/
7+
/**
8+
* SuperMap Leaflet基类
39
* 定义命名空间
410
* 提供公共模块
511
*/
612
import L from "leaflet";
713
import './NonEarthCRS';
814
import './Proj4Leaflet';
915
import './ExtendsCRS';
10-
import Attributions from './Attributions'
16+
import Attributions from './Attributions';
1117

1218
L.supermap = L.supermap || {};
1319
L.supermap.control = L.supermap.control || {};

src/mapboxgl/core/Base.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
* SuperMap mapboxgl基类
33
* 定义命名空间
44
*/
5+
/**
6+
* @namespace mapboxgl
7+
*/
8+
/**
9+
* @namespace mapboxgl.supermap
10+
*/
511
import mapboxgl from 'mapbox-gl';
612
import './MapExtend';
713

src/openlayers/services/ServiceBase.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import ol from 'openlayers';
2-
2+
/**
3+
* @namespace ol
4+
*/
5+
/**
6+
* @namespace ol.supermap
7+
*/
8+
/**
9+
* @namespace ol.source
10+
*/
311
ol.supermap = ol.supermap || {};
412

513
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy