Logo
Explore Help
Sign In
honeymoose/angular-cn
1
0
Fork 0
You've already forked angular-cn
Code Issues Pull Requests Packages Projects Releases Wiki Activity
angular-cn/aio/tools/transforms/angular-api-package/processors/fixupRealProjectRelativePath.js

15 lines
517 B
JavaScript
Raw Normal View History

build(docs-infra): display github links in CLI API docs (#26515) This commit includes the following changes: * CLI version information is read from the CLI package from which we read the help files. * CLI API pages now contain GH links * line numbers are not shown in GH links, if the doc does not have a truthy `startingLine` value. This allows us to remove hard coded checks for `guide` pages * content pages and CLI api docs no longer have a `startingLine` * the hard-coded `packages` path segment has been removed from the templates; instead we now only use the `realProjectRelativePath`. * the `realProjectRelativePath` has been updated accordingly for API and CLI API docs. PR Close #26515
2018-10-17 15:45:47 +01:00
module.exports = function fixupRealProjectRelativePath(API_DOC_TYPES) {
return {
$runAfter: ['readTypeScriptModules'],
$runBefore: ['processing-docs'],
$process(docs) {
docs.forEach(doc => {
if (API_DOC_TYPES.indexOf(doc.docType) !== -1 && doc.fileInfo && doc.fileInfo.realProjectRelativePath) {
// this is an API doc - so fix up its real path
doc.fileInfo.realProjectRelativePath = 'packages/' + doc.fileInfo.realProjectRelativePath;
}
});
}
};
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 453ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API