Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Cleaning! #86

Open
dsessler7 opened this issue Apr 15, 2022 · 1 comment
Open

Spring Cleaning! #86

dsessler7 opened this issue Apr 15, 2022 · 1 comment

Comments

@dsessler7
Copy link
Contributor

Remove unnecessary files, clean up code, extract functions into helper function files when appropriate, adjust filesystem structure to best practices, etc

@MFatigati
Copy link
Contributor

I started spring cleaning, along the following lines:

  1. Separated out the functions I was mostly responsible for into into as many descriptive helper functions as I could.
  2. Put these helper functions in new files appsHelpers.js, clusterHelpers.js, and clusterMetricsHelpers.js respectively.
  3. Imported the helper functions into apps.js and cluster.js, respectively.
  4. Put the functions I want to export from apps.js and cluster.js outside of the module.exports block, only including their names in the module.exports block. This is how I've seen it done most often, and it makes it a bit more readable. You can quickly see which functions are being exported, then scroll up to see the functions themselves.

I think our goal should be to only have apps.js and cluster.js only contain the specific actual functions we are exporting from those files, and to have those exported functions be as lean as possible, with helper functions in a separate file.

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

No branches or pull requests

2 participants