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

New configuration Feature: moduleConfig #3682

Closed
wants to merge 11 commits into from

Conversation

bugsounet
Copy link
Contributor

@bugsounet bugsounet commented Jan 5, 2025

moduleConfig

it's allows to set module config from another config file in module config folder

sample for calendar:

{
  module: "calendar",
  header: "US Holidays",
  position: "top_left",
  moduleConfig: "config.js"
}

if moduleConfig is defined, it will look for the defined config in the module's config folder

sample remote config file in calendar/config/config.js:

const config = {
  calendars: [
    {
      fetchInterval: 7 * 24 * 60 * 60 * 1000,
      symbol: "calendar-check",
      url: "https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics"
    }
  ]
};

module.exports = config;

Todo:

  • add it in test suite

@bugsounet bugsounet marked this pull request as draft January 5, 2025 07:15
@bugsounet
Copy link
Contributor Author

@rejas, @khassel : can i have a review at this state, thx guys

@KristjanESPERANTO
Copy link
Contributor

Interesting, but what is the use case here? 🙂

@bugsounet
Copy link
Contributor Author

bugsounet commented Jan 5, 2025

  • avoid having a very very heavy MM² config file
  • allows you to find your (final) config more quickly
  • allows to create multi-config (exemple: multi instance configs, test config,...)

@sdetweil
Copy link
Collaborator

sdetweil commented Jan 5, 2025

i don't understand any of those use case words

@bugsounet
Copy link
Contributor Author

@sdetweil : ok, should i close it so ?

@sdetweil sdetweil closed this Jan 5, 2025
@sdetweil
Copy link
Collaborator

sdetweil commented Jan 5, 2025

maybe you could give some practical examples how this solves whatever problem you see

i dont see any reduction in config info. just moving it from one place to another

@bugsounet
Copy link
Contributor Author

bugsounet commented Jan 5, 2025

maybe you could give some practical examples how this solves whatever problem you see

hey, there is no problem... it's not an issue!
it's just a PR

i dont see any reduction in config info. just moving it from one place to another

just there

What do you search really ?
Personally, I am looking to add features to MM²

@bugsounet
Copy link
Contributor Author

In any case, it's only 2 days of coding and testing lost.

(I am frustrated)

Thx

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