gbowne1 / gbowne1/codestream

[TODO][Enhance] Separate main.js

Open
#78 3 comments 0 reactions 0 assignees View on GitHub
bug documentation enhancement good first issue help wanted question
Dominant language
JavaScript
Stars
9
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.