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 22// See end of file for extended copyright information.
33
44import {
5+ ErrorDocumentation ,
56 documentationDirectoryPath ,
67 loadErrorDocumentationFilesAsync ,
78 reportProblemsInDocumentsAsync ,
89} from "./src/error-documentation.mjs" ;
910
1011async 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+ }
1426 await reportProblemsInDocumentsAsync ( documents ) ;
1527}
1628
Original file line number Diff line number Diff line change 11{
22 "global-groups": [
33 "browser",
4- "ecmascript"
4+ "ecmascript",
5+ "node.js"
56 ]
67}
You can’t perform that action at this time.
0 commit comments