api-builder: add simplified name to module docs

This commit is contained in:
Peter Bacon Darwin 2015-11-13 14:08:54 +00:00
parent 888f9ff8d8
commit 954a3827b7
1 changed files with 3 additions and 1 deletions

View File

@ -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: [],