api-builder: add simplified name to module docs
This commit is contained in:
parent
888f9ff8d8
commit
954a3827b7
|
@ -142,10 +142,12 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
||||||
|
|
||||||
function createModuleDoc(moduleSymbol, basePath) {
|
function createModuleDoc(moduleSymbol, basePath) {
|
||||||
var id = moduleSymbol.name.replace(/^"|"$/g, '');
|
var id = moduleSymbol.name.replace(/^"|"$/g, '');
|
||||||
|
var name = id.split('/').pop();
|
||||||
var moduleDoc = {
|
var moduleDoc = {
|
||||||
docType: 'module',
|
docType: 'module',
|
||||||
|
name: name,
|
||||||
id: id,
|
id: id,
|
||||||
aliases: [id],
|
aliases: [id, name],
|
||||||
moduleTree: moduleSymbol,
|
moduleTree: moduleSymbol,
|
||||||
content: getContent(moduleSymbol),
|
content: getContent(moduleSymbol),
|
||||||
exports: [],
|
exports: [],
|
||||||
|
|
Loading…
Reference in New Issue