-
Notifications
You must be signed in to change notification settings - Fork 25
[TODO][Enhance] Separate main.js #78
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Projects
Status
Todo
We should now start to think about making main.js into set of 2 or 3 main app files like main.js, app.js and index.js and including a large separation of concerns by making the rest into imported modules. One of these being a place to have a main application that houses DOMContentLoaded. The DOMContentLoaded would then pass in imported modules that get init inside the DOMContentLoaded. All the index.html would have to do is script module tag at least the one with DOMContentLoaded and not have to worry about a single file
This should probably be done along with the previous issue #77
If you need an example of this look at
https://github.com/gbowne1/RadioLogger/blob/f5389f37aa8047ef4f745be97cd60a7d488e60fd/src/client/public/app.js#L9
Fron there it gets imported here
https://github.com/gbowne1/RadioLogger/blob/f5389f37aa8047ef4f745be97cd60a7d488e60fd/src/client/public/index.html#L19
This is how that project was done. Then you would not have to import lots of scripts via script tag to the html. The app.js, index.js, main.js would do all the heavy lifting by import modules from there.
Again reserve this for during #77 cycle/ process and after all of the remaining PRs up to #68 get merged
I believe this will help avoid merge conflict. It's also less hacky and easier to read
We will house seach related items in a search module, login in login module, and so forth.
Oh and use ES7+ JavaScript (import, etc)