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`.
This commit is contained in:
parent
c0e6ccc782
commit
d404a7d2cf
|
@ -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';
|
||||
})
|
||||
|
|
|
@ -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');
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue