Skip to content

Conversation

@emmadal
Copy link
Contributor

@emmadal emmadal commented Oct 29, 2021

No description provided.

@linear
Copy link

linear bot commented Oct 29, 2021

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62d0226
Status: ✅  Deploy successful!
Preview URL: https://307fafbb.platform-nan-dev-8sl.pages.dev

View logs

process.env.HASH = `unk@${now.toString(36)}`
}

export const modJsDir = () => readdir(join(rootDir, 'js-module'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pas convaincu de l'utilite de cette fonction, elle abstrait les mauvaise chose a mon avis.

A la limite fait un readdirFromRoot = path => readdir(join(rootDir, path))
Mais franchement on gagne pas grand chose vs juste faire le call

}),
)
return entries
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pareil, pas sur que ca soit specialement une bonne abstraction, a la limite faire un readdirContent:

const readdirContent = path => {
   const files = readdir(join(rootDir, path))
   const pendingEntries = files.map(async (fileName) => [
     fileName,
     await readFile(join(rootDir, path, fileName)),
   ])
   return Promise.all(pendingEntries)
}

Plus generique et re-utilisable, et tu fait la passe de markdown apres

})

await (await readdir(rootDir))
.filter((filename) => filename.includes('module.json'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.endsWith plutot que .includes la

const modulebundle = await bundleJSONDir('modulebundle')
dirList.map(async (file) => {
const data = Object.fromEntries(entries)[file]
await writeFile(`${file.split('.md')[0]}.json`, JSON.stringify(data))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file.split('.md')[0]}.json toujours pas une tres bonne facon d'extraire l'extension


- variables
- data types
- console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya pas de markdown vraiment a parser pour les modules, tu peu gerer un README mais la il aura pas ce genre de contenu, juste une description libre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants