File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 2
2
// See end of file for extended copyright information.
3
3
4
4
import {
5
+ ErrorDocumentation ,
5
6
documentationDirectoryPath ,
6
7
loadErrorDocumentationFilesAsync ,
7
8
reportProblemsInDocumentsAsync ,
8
9
} from "./src/error-documentation.mjs" ;
9
10
10
11
async function mainAsync ( ) {
11
- let documents = await loadErrorDocumentationFilesAsync (
12
- documentationDirectoryPath
13
- ) ;
12
+ let files = process . argv . slice ( 2 ) ;
13
+ let documents ;
14
+ if ( files . length === 0 ) {
15
+ documents = await loadErrorDocumentationFilesAsync (
16
+ documentationDirectoryPath
17
+ ) ;
18
+ } else {
19
+ documents = await Promise . all (
20
+ files . map (
21
+ async ( fileName ) =>
22
+ await await ErrorDocumentation . parseFileAsync ( fileName )
23
+ )
24
+ ) ;
25
+ }
14
26
await reportProblemsInDocumentsAsync ( documents ) ;
15
27
}
16
28
Original file line number Diff line number Diff line change 1
1
{
2
2
"global-groups": [
3
3
"browser",
4
- "ecmascript"
4
+ "ecmascript",
5
+ "node.js"
5
6
]
6
7
}
You can’t perform that action at this time.
0 commit comments