lundi 17 décembre 2018

How to structure vanilla JS project?

I'm creating a replica of GitHub with Vanilla JS.

I'm thinking what would be the best way to go about it.

How should I divide the folders and files?

I think about

model/ - get the data
router/ - set the URL pretty
views/ - append to dom with the data
generic/ - header, footer, generic stuff..
utility - helpers like validate the user login or input or whatever

Or would it be better to create e.g. sidebar folder and in the sidebar folder have the model, view, router, etc...

How would you go about doing this?

Aucun commentaire:

Enregistrer un commentaire