@@ -186,39 +186,21 @@ const buildTilde = async () => {
186
186
] . join ( "\n" ) ;
187
187
} ;
188
188
189
- async function processReadme ( ) {
190
- markdownMagic ( path . join ( __dirname , ".." , "README.md" ) , {
189
+ async function run ( ) {
190
+ await markdownMagic ( path . join ( __dirname , ".." , "README.md" ) , {
191
191
transforms : {
192
192
RULES : ( ) => buildRulesTable ( ruleTableRows ) ,
193
193
TILDE : ( ) => buildTilde ( ) ,
194
194
} ,
195
195
failOnMissingTransforms : true ,
196
196
} ) ;
197
- }
198
-
199
- async function processRuleDocs ( ) {
200
- // const docRoot = path.resolve(__dirname, "..", "docs");
201
-
202
- markdownMagic ( path . resolve ( __dirname , ".." , "docs" , "*.md" ) , {
197
+ await markdownMagic ( path . resolve ( __dirname , ".." , "docs" , "*.md" ) , {
203
198
transforms : {
204
199
HEADER : ( { srcPath } : any ) => buildHeader ( path . basename ( srcPath ) ) ,
205
200
OPTIONS : ( { srcPath } : any ) => buildOptions ( path . basename ( srcPath ) ) ,
206
201
CASES : ( { content, srcPath } : any ) => buildCases ( content , path . basename ( srcPath ) ) ,
207
202
} ,
208
203
failOnMissingTransforms : true ,
209
204
} ) ;
210
-
211
- // const docFiles = (await fs.readdir(docRoot)).filter((p) => p.endsWith(".md"));
212
- // for (const docFile of docFiles) {
213
- // markdownMagic(path.join(docRoot, docFile), {
214
- // transforms: {
215
- // HEADER: ({ content, srcPath }: any) => buildHeader(path.basename(srcPath)),
216
- // OPTIONS: ({ content, srcPath }: any) => buildOptions(path.basename(srcPath)),
217
- // CASES: ({ content, srcPath }: any) => buildCases(content, path.basename(srcPath)),
218
- // },
219
- // failOnMissingTransforms: true,
220
- // });
221
- // }
222
205
}
223
-
224
- Promise . all ( [ processReadme ( ) , processRuleDocs ( ) ] ) ;
206
+ run ( ) ;
0 commit comments