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 702 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.
    • ankonaskiff17A Offline
      ankonaskiff17
      last edited by

      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 BKeyportB 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @ankonaskiff17
        last edited by

        @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
        • BKeyportB Online
          BKeyport Module Developer @ankonaskiff17
          last edited by BKeyport

          @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 Reply Quote 0
          • S Offline
            sdetweil @BKeyport
            last edited by

            @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

            ankonaskiff17A 1 Reply Last reply Reply Quote 0
            • ankonaskiff17A Offline
              ankonaskiff17 @sdetweil
              last edited by

              @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
              • First post
                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