diff --git a/docs/dgeni-package/index.js b/docs/dgeni-package/index.js index 27acfdefcd..c26353ac9f 100644 --- a/docs/dgeni-package/index.js +++ b/docs/dgeni-package/index.js @@ -13,6 +13,7 @@ var GUIDES_PATH = PARTIAL_PATH + '/guides'; module.exports = new Package('angular', [jsdocPackage, nunjucksPackage]) // Register the services and file readers +.factory(require('./services/modules')) .factory(require('./services/atParser')) .factory(require('./services/getJSDocComment')) .factory(require('./services/SourceFile')) @@ -44,6 +45,7 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage]) readFilesProcessor.fileReaders = [atScriptFileReader, ngdocFileReader]; readFilesProcessor.basePath = path.resolve(__dirname, '../..'); readFilesProcessor.sourceFiles = [ + { include: 'modules/*/*.js', basePath: 'modules' }, { include: 'modules/*/src/**/*.js', basePath: 'modules' }, { include: 'modules/*/docs/**/*.md', basePath: 'modules' }, { include: 'docs/content/**/*.md', basePath: 'docs/content' } diff --git a/docs/dgeni-package/readers/atScript.js b/docs/dgeni-package/readers/atScript.js index b6e3f1cef6..b6dcfa9168 100644 --- a/docs/dgeni-package/readers/atScript.js +++ b/docs/dgeni-package/readers/atScript.js @@ -7,7 +7,7 @@ var path = require('canonical-path'); * This file reader will create a simple doc for each * file including a code AST of the AtScript in the file. */ -module.exports = function atScriptFileReader(log, atParser) { +module.exports = function atScriptFileReader(log, atParser, modules) { var reader = { name: 'atScriptFileReader', defaultPattern: /\.js$/, @@ -18,6 +18,8 @@ module.exports = function atScriptFileReader(log, atParser) { moduleDoc.id = moduleDoc.moduleTree.moduleName; moduleDoc.aliases = [moduleDoc.id]; + modules[moduleDoc.id] = moduleDoc; + // Readers return a collection of docs read from the file // but in this read there is only one document (module) to return return [moduleDoc]; diff --git a/docs/dgeni-package/services/modules.js b/docs/dgeni-package/services/modules.js new file mode 100644 index 0000000000..7601390220 --- /dev/null +++ b/docs/dgeni-package/services/modules.js @@ -0,0 +1,3 @@ +module.exports = function modules() { + return {}; +};