• 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.

NPM script to bundle the server and the client

Scheduled Pinned Locked Moved Unsolved Feature Requests
6 Posts 3 Posters 296 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.
  • S Offline
    SimoneMSR
    last edited by Nov 16, 2024, 12:00 PM

    I am wondering whether there is a script to bundle the server app and the client app of MM, so that they are minified in 2 to 10 files or more, but not 10.000.
    I have just found this discussion, which seems old and closed.

    Would you help answering this question?

    S 1 Reply Last reply Nov 16, 2024, 12:40 PM Reply Quote 0
    • S Away
      sdetweil @SimoneMSR
      last edited by sdetweil Nov 18, 2024, 12:17 PM Nov 16, 2024, 12:40 PM

      @SimoneMSR why do you want this?
      what is the problem you are trying to solve?

      we are not trying to make our disk size smaller
      nor our memory footprint
      nor protecting our ip w minify

      how do you do as a bundle and have it extendable/configurable by the user

      the vast majority of our runtime code is in handling the placement of content in the dom.
      there is a bunch of onetime convert from text to operational data. then trigger each module to do its thing, call us when you have new content

      packaging is for distribution for multiple users and ‘minimize’ the number of files sent over the network,
      but this is all private network not public, and the amount of data moved over the local network is minuscule as the ui and the app are on the same machine 99% of the time

      this wouldn’t affect the sourcing of data by the modules. but again this is a tiny amount of data
      used by a single user

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Nov 18, 2024, 10:24 AM Reply Quote 0
      • S Offline
        SimoneMSR @sdetweil
        last edited by Nov 18, 2024, 10:24 AM

        @sdetweil Hello Sam,
        thanks for the question, that I will answer now. I see your point, but I am working with a company that has several devices, and the deploy can be long.

        I would like to fasten the upload of source code into my device. Up to now, the upload can stand for 30minutes or more, and on android, I have to make an additional 30minutes move to the Termux app folders, in order for me to run MM on that device.

        Thank you for the help

        S 1 Reply Last reply Nov 18, 2024, 12:32 PM Reply Quote 0
        • S Away
          sdetweil @SimoneMSR
          last edited by Nov 18, 2024, 12:32 PM

          @SimoneMSR we don’t run on Android. So I’m not sure we are talking about the same thing

          MagicMirror is a single page web server. The page is composed of live JavaScript code in multiple modules to dynamically render their little bits of the page at runtime

          So you would download the empty MagicMirror project somewhere. Add modules, configure the modules. Test
          And distribute that. Or make that the server the client devices connect to using the native device browser, which they would already have

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          T 1 Reply Last reply 8 days ago Reply Quote 0
          • T Offline
            Tammieda @sdetweil
            last edited by 8 days ago

            @sdetweil You could try using a build tool like Webpack or Vite to bundle both server and client apps into fewer, optimized files. Have you checked if there’s an existing config or plugin for MM that supports this, or would you need help setting one up from scratch?

            S 1 Reply Last reply 8 days ago Reply Quote 0
            • S Away
              sdetweil @Tammieda
              last edited by 8 days ago

              @Tammieda i am not the OP and i dont see how this would work.

              its been 7 years since the original discussion, and no example has been forthcoming

              anyhow the MagicMirror team is not working on this.
              anyone else is welcome to experiment and post issues

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • 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