@@ -11,29 +11,29 @@ const here = (...p) => path.join(__dirname, ...p)
1111// const logVerbose = (...args) => (VERBOSE ? console.log(...args) : undefined)
1212
1313const workshopRoot = here ( '..' )
14- const examples = ( await readDir ( here ( '../examples' ) ) ) . map ( dir =>
14+ const examples = ( await readDir ( here ( '../examples' ) ) ) . map ( ( dir ) =>
1515 here ( `../examples/${ dir } ` ) ,
1616)
1717const exercises = ( await readDir ( here ( '../exercises' ) ) )
18- . map ( name => here ( `../exercises/${ name } ` ) )
19- . filter ( filepath => fs . statSync ( filepath ) . isDirectory ( ) )
18+ . map ( ( name ) => here ( `../exercises/${ name } ` ) )
19+ . filter ( ( filepath ) => fs . statSync ( filepath ) . isDirectory ( ) )
2020const exerciseApps = (
2121 await Promise . all (
22- exercises . flatMap ( async exercise => {
22+ exercises . flatMap ( async ( exercise ) => {
2323 return ( await readDir ( exercise ) )
24- . filter ( dir => {
24+ . filter ( ( dir ) => {
2525 return / ( p r o b l e m | s o l u t i o n ) / . test ( dir )
2626 } )
27- . map ( dir => path . join ( exercise , dir ) )
27+ . map ( ( dir ) => path . join ( exercise , dir ) )
2828 } ) ,
2929 )
3030) . flat ( )
31- const exampleApps = ( await readDir ( here ( '../examples' ) ) ) . map ( dir =>
31+ const exampleApps = ( await readDir ( here ( '../examples' ) ) ) . map ( ( dir ) =>
3232 here ( `../examples/${ dir } ` ) ,
3333)
3434const apps = [ ...exampleApps , ...exerciseApps ]
3535
36- const appsWithPkgJson = [ ...examples , ...apps ] . filter ( app => {
36+ const appsWithPkgJson = [ ...examples , ...apps ] . filter ( ( app ) => {
3737 const pkgjsonPath = path . join ( app , 'package.json' )
3838 return exists ( pkgjsonPath )
3939} )
@@ -71,7 +71,7 @@ async function updateRootTsConfig() {
7171 const tsconfig = {
7272 files : [ ] ,
7373 exclude : [ 'node_modules' ] ,
74- references : appsWithPkgJson . map ( a => ( {
74+ references : appsWithPkgJson . map ( ( a ) => ( {
7575 path : relativeToWorkshopRoot ( a ) . replace ( / \\ / g, '/' ) ,
7676 } ) ) ,
7777 }
@@ -92,7 +92,7 @@ async function updateRootTsConfig() {
9292}
9393
9494async function copyExerciseTsConfigs ( ) {
95- const exercisesWithoutTsCongif = exerciseApps . filter ( exercisePath => {
95+ const exercisesWithoutTsCongif = exerciseApps . filter ( ( exercisePath ) => {
9696 return ! fs . existsSync ( path . join ( exercisePath , 'tsconfig.json' ) )
9797 } )
9898
@@ -106,7 +106,7 @@ async function copyExerciseTsConfigs() {
106106 )
107107
108108 await Promise . all (
109- exercisesWithoutTsCongif . map ( exercisePath => {
109+ exercisesWithoutTsCongif . map ( ( exercisePath ) => {
110110 const tsConfigPath = path . resolve ( exercisePath , 'tsconfig.json' )
111111 return fs . promises . writeFile ( tsConfigPath , tsConfigTemplate )
112112 } ) ,
@@ -119,7 +119,7 @@ async function copyExercisePrettierConfigs() {
119119 'utf8' ,
120120 )
121121 await Promise . all (
122- exerciseApps . map ( exercise => {
122+ exerciseApps . map ( ( exercise ) => {
123123 const prettierConfigPath = path . join ( exercise , '.prettierrc' )
124124 return fs . promises . writeFile ( prettierConfigPath , prettierConfig )
125125 } ) ,
0 commit comments