build(aio): add the api folder to the list of template folders
This commit is contained in:
parent
c8dc116951
commit
3f1d7f7a76
|
@ -9,7 +9,7 @@ const Package = require('dgeni').Package;
|
|||
|
||||
const basePackage = require('../angular-base-package');
|
||||
const typeScriptPackage = require('dgeni-packages/typescript');
|
||||
const { API_SOURCE_PATH, requireFolder } = require('../config');
|
||||
const { API_SOURCE_PATH, API_TEMPLATES_PATH, requireFolder } = require('../config');
|
||||
|
||||
module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
||||
|
||||
|
@ -107,6 +107,12 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
|||
});
|
||||
})
|
||||
|
||||
.config(function(templateFinder) {
|
||||
// Where to find the templates for the API doc rendering
|
||||
templateFinder.templateFolders.unshift(API_TEMPLATES_PATH);
|
||||
})
|
||||
|
||||
|
||||
.config(function(convertToJsonProcessor, postProcessHtml, EXPORT_DOC_TYPES) {
|
||||
const DOCS_TO_CONVERT = EXPORT_DOC_TYPES.concat([
|
||||
'decorator', 'directive', 'pipe', 'module'
|
||||
|
|
|
@ -4,6 +4,7 @@ const { readdirSync } = require('fs');
|
|||
const PROJECT_ROOT = resolve(__dirname, '../../..');
|
||||
const AIO_PATH = resolve(PROJECT_ROOT, 'aio');
|
||||
const TEMPLATES_PATH = resolve(AIO_PATH, 'tools/transforms/templates');
|
||||
const API_TEMPLATES_PATH = resolve(TEMPLATES_PATH, 'api');
|
||||
const CONTENTS_PATH = resolve(AIO_PATH, 'content');
|
||||
const OUTPUT_PATH = resolve(AIO_PATH, 'src/content');
|
||||
const DOCS_OUTPUT_PATH = resolve(OUTPUT_PATH, 'docs');
|
||||
|
@ -16,5 +17,5 @@ function requireFolder(dirname, folderPath) {
|
|||
.map(p => require(resolve(absolutePath, p)));
|
||||
}
|
||||
|
||||
module.exports = { PROJECT_ROOT, AIO_PATH, TEMPLATES_PATH, CONTENTS_PATH, OUTPUT_PATH, DOCS_OUTPUT_PATH, API_SOURCE_PATH, requireFolder };
|
||||
module.exports = { PROJECT_ROOT, AIO_PATH, TEMPLATES_PATH, API_TEMPLATES_PATH, CONTENTS_PATH, OUTPUT_PATH, DOCS_OUTPUT_PATH, API_SOURCE_PATH, requireFolder };
|
||||
|
||||
|
|
Loading…
Reference in New Issue