• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Generic Config.js & Module Question

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 762 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    ankonaskiff17
    last edited by Jul 16, 2021, 2:43 PM

    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 with true then you can delete that line in config.js because it is coded true in the file you installed in MagicMirror/modules?

    S B 2 Replies Last reply Jul 16, 2021, 3:01 PM Reply Quote 0
    • S Offline
      sdetweil @ankonaskiff17
      last edited by Jul 16, 2021, 3:01 PM

      @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

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • B Offline
        BKeyport Module Developer @ankonaskiff17
        last edited by BKeyport Jul 16, 2021, 6:26 PM Jul 16, 2021, 6:25 PM

        @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.js

        Same for CSS
        CSS in MM
        CSS in module’s CSS
        CSS in custom.css

        Each step inherits the previous by default, then overrides with new if specified.

        The "E" in "Javascript" stands for "Easy"

        S 1 Reply Last reply Jul 16, 2021, 6:28 PM Reply Quote 0
        • S Offline
          sdetweil @BKeyport
          last edited by Jul 16, 2021, 6:28 PM

          @bkeyport its better to think of it as a stack

          custom
          
          module(s)
          
          main
          

          topmost wins

          same for config

          config.js
          
          module
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          A 1 Reply Last reply Jul 16, 2021, 9:32 PM Reply Quote 0
          • A Offline
            ankonaskiff17 @sdetweil
            last edited by Jul 16, 2021, 9:32 PM

            @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?

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy