mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Refs #42966. Look for changes in error docs (i.e. docs under `aio/content/error/`) in `authors-package`, so that such docs are tracked when running the `serve-and-sync` script. PR Close #44704
24 lines
656 B
JavaScript
24 lines
656 B
JavaScript
/**
|
|
* @dgService
|
|
* @description
|
|
* This file reader will pull the contents from an extended diagnostic text file (by default `.md`).
|
|
*
|
|
* The doc will initially have the form:
|
|
* ```
|
|
* {
|
|
* docType: 'extended-diagnostic',
|
|
* content: 'the content of the file',
|
|
* }
|
|
* ```
|
|
*/
|
|
module.exports = function extendedDiagnosticFileReader() {
|
|
return {
|
|
name: 'extendedDiagnosticFileReader',
|
|
defaultPattern: /\.md$/,
|
|
getDocs: fileInfo => {
|
|
// We return a single element array because extended-diagnostic files only contain one
|
|
// document.
|
|
return [{docType: 'extended-diagnostic', content: fileInfo.content}];
|
|
},
|
|
};
|
|
};
|