File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 11import fs from "fs/promises" ;
22import * as path from "path" ;
3- import { fileURLToPath } from "url" ;
43
5- const __filename = fileURLToPath ( import . meta. url ) ;
6- const __dirname = path . dirname ( __filename ) ;
4+ const basePath = new URL (
5+ "../../inputfiles/mdn/files/en-us/web/api/" ,
6+ import . meta. url ,
7+ ) . pathname ;
78
89function extractSummary ( markdown : string ) : string {
910 // Remove frontmatter (--- at the beginning)
@@ -73,11 +74,6 @@ async function getIndexMdContents(
7374}
7475
7576export async function generateDescription ( ) : Promise < Record < string , string > > {
76- const basePath = path . resolve (
77- __dirname ,
78- "../inputfiles/mdn/files/en-us/web/api" ,
79- ) ;
80-
8177 try {
8278 const folders = await getFolders ( basePath ) ;
8379 if ( folders . length > 0 ) {
You can’t perform that action at this time.
0 commit comments