From 9b71ddf7b45004b9e244f9ee6f97f2644bb8d004 Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 1 Apr 2019 13:48:31 +0530 Subject: [PATCH 1/2] added support to @ngdoc arugment --- publish.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/publish.js b/publish.js index 0eefeda..3c8ec84 100644 --- a/publish.js +++ b/publish.js @@ -344,6 +344,12 @@ function buildNav(members) { nav.push(buildNavLink('home', 'Home')) + // angular + nav = nav.concat(buildMemberNav(members.services, "Services", seen, linkto)) + nav = nav.concat(buildMemberNav(members.controllers, "Controllers", seen, linkto)) + nav = nav.concat(buildMemberNav(members.directives, "Directives", seen, linkto)) + nav = nav.concat(buildMemberNav(members.filters, "Filters", seen, linkto)) + nav = nav.concat(buildMemberNav(members.tutorials, "Tutorials", seenTutorials, linktoTutorial)) nav = nav.concat(buildMemberNav(members.classes, "Classes", seen, linkto)) nav = nav.concat(buildMemberNav(members.modules, "Modules", {}, linkto)) @@ -353,6 +359,8 @@ function buildNav(members) { nav = nav.concat(buildMemberNav(members.mixins, "Mixins", seen, linkto)) nav = nav.concat(buildMemberNav(members.interfaces, "Interfaces", seen, linkto)) + + if (members.globals.length) { nav.push(buildNavHeading(linkto('global', 'Globals'))) @@ -380,6 +388,7 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) { nav.push(buildNavHeading(itemHeading)) items.forEach(function(item) { + var methods = find({ kind: "function", memberof: item.longname }) var members = find({ kind: "member", memberof: item.longname }) var displayName @@ -681,6 +690,12 @@ exports.publish = function(taffyData, opts, tutorials) { var members = helper.getMembers(data) members.tutorials = tutorials.children + // angular + members.services = find({ngdoc: 'service'}) + members.directives = find({ngdoc: 'directive'}) + members.controllers = find({ngdoc: 'controller'}) + members.filters = find({ngdoc: 'filter'}) + // output pretty-printed source files by default var outputSourceFiles = conf.default && conf.default.outputSourceFiles !== false @@ -734,6 +749,10 @@ exports.publish = function(taffyData, opts, tutorials) { var mixins = taffy(members.mixins) var externals = taffy(members.externals) var interfaces = taffy(members.interfaces) + var services = taffy(members.services) + var controllers = taffy(members.controllers) + var directives = taffy(members.directives) + var filters = taffy(members.filters) Object.keys(helper.longnameToUrl).forEach(function(longname) { var myModules = helper.find(modules, { longname: longname }) @@ -795,6 +814,46 @@ exports.publish = function(taffyData, opts, tutorials) { helper.longnameToUrl[longname] ) } + + var myFilters = helper.find(filters, { longname: longname }) + if (myFilters.length) { + generate( + "Filter", + myFilters[0].name, + myFilters, + helper.longnameToUrl[longname] + ) + } + + var myServices = helper.find(services, { longname: longname }) + if (myServices.length) { + generate( + "Service", + myServices[0].name, + myServices, + helper.longnameToUrl[longname] + ) + } + + var myContollers = helper.find(controllers, { longname: longname }) + if (myContollers.length) { + generate( + "Controller", + myContollers[0].name, + myContollers, + helper.longnameToUrl[longname] + ) + } + + var myDirectives = helper.find(directives, { longname: longname }) + if (myDirectives.length) { + generate( + "Directive", + myDirectives[0].name, + myDirectives, + helper.longnameToUrl[longname] + ) + } }) // TODO: move the tutorial functions to templateHelper.js From c6e81530ee71e3e922c014d0d2e075adf61f88d0 Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 1 Apr 2019 13:49:43 +0530 Subject: [PATCH 2/2] Update package.json --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 51ba013..4417ee3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "minami", - "version": "1.2.3", - "description": "Clean and minimal JSDoc 3 Template / Theme", + "name": "angular-minami", + "version": "1.0.0", + "description": "Clean and minimal JSDoc 3 Template / Theme supporting Angular JS 1.x", "main": "publish.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"