From d404a7d2cf5274c2cb8fb8f0a445debdd53540d5 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 3 Nov 2015 11:30:46 +0000 Subject: [PATCH] docs-package: don't initialize the `readFilesProcessor` The current setup for angular.io does not use the `readFilesProcessor` so the `docs-package` doesn't need to configure it. (For example, all the guide docs are written in straight Jade and are not processed by dgeni). In fact the `angular.io-package` explicitly disables this processor. Given this, setting the basePath for the `readFilesProcessor` in the `angular.io-package` is not really a hack, since we do need it for the `writeFilesProcessor`. --- public/api-builder/angular.io-package/index.js | 4 ---- public/api-builder/docs-package/index.js | 8 +------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/public/api-builder/angular.io-package/index.js b/public/api-builder/angular.io-package/index.js index 9e1bc97c10..32ff362a83 100644 --- a/public/api-builder/angular.io-package/index.js +++ b/public/api-builder/angular.io-package/index.js @@ -32,10 +32,6 @@ module.exports = new Package('angular.io', [basePackage]) ]; readTypeScriptModules.hidePrivateMembers = true; - // HACK - readFileProcessor.basePath set to point to a local repo location - // because the docs-package-processor will - // have previously set it to point to angular/angular repo. - // needed because the writeFilesProcessor uses the readFilesProcessor's basePath. readFilesProcessor.basePath = path.resolve(__dirname, "../../docs"); writeFilesProcessor.outputFolder = 'js/latest/api'; }) diff --git a/public/api-builder/docs-package/index.js b/public/api-builder/docs-package/index.js index a7c3d47b39..a5dd5bdff5 100644 --- a/public/api-builder/docs-package/index.js +++ b/public/api-builder/docs-package/index.js @@ -43,17 +43,11 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage, if (!fs.existsSync(angular_repo_path)) { throw new Error('build-api-docs task requires the angular2 repo to be at ' + angular_repo_path); } - readFilesProcessor.basePath = angular_repo_path; - readFilesProcessor.sourceFiles = [ - { include: 'modules/*/docs/**/*.md', basePath: 'modules' }, - { include: 'docs/content/**/*.md', basePath: 'docs/content' } - ]; - readTypeScriptModules.sourceFiles = [ '*/*.@(js|es6|ts)', '*/src/**/*.@(js|es6|ts)' ]; - readTypeScriptModules.basePath = path.resolve(readFilesProcessor.basePath, 'modules'); + readTypeScriptModules.basePath = path.resolve(angular_repo_path, 'modules'); })