Read the statement by Michael Teeuw here.
Generic Config.js & Module Question
-
If you go with the default settings that are coded in to each module, you can delete that from the config.js module script associated with each module?
For example, if
color: true,
is the default and you are going to stick withtrue
then you can delete that line in config.js because it is codedtrue
in the file you installed in MagicMirror/modules? -
@ankonaskiff17 correct… the design is the config.js settings replace to defaults in the module code.
if they are not specified in config.js then there is nothing to replace with, so the defaults are used
this makes it so you only have to specify what you need
-
@ankonaskiff17 Yes. I think of it this way (Not quite correct, but it helps me wrap my head around it)
Loading order:
config in MM
config in module
config in config.jsSame for CSS
CSS in MM
CSS in module’s CSS
CSS in custom.cssEach step inherits the previous by default, then overrides with new if specified.
-
@bkeyport its better to think of it as a stack
custom module(s) main
topmost wins
same for config
config.js module
-
@sdetweil @BKeyport just trigggered a question on inheritance. On several occasions when I have Developer Tool up to look at something , I’ll see message text that is roughly “X is inherited from body” or from main. Been a while since I was really poking around in developer tool mode. Think above was in context of CSS. So in event you want to change X, how do you tackle without it having global impact?