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.

    Module programming preview, jsfiddle?

    Scheduled Pinned Locked Moved General Discussion
    11 Posts 5 Posters 8.2k Views 5 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.
    • morozgrafixM Offline
      morozgrafix Moderator @washichi
      last edited by morozgrafix

      @washichi Interesting idea for the module. And glancing at your code you seem to be on the right track.

      I may be not understanding what you trying Sublime Text to do. It’s just a text editor with ability to add various packages on top of it. It’s not a full blown IDE. I don’t believe that you can compile or preview the JavaScript module directly in Sublime.

      My general workflow for module creation is something like this:

      1. Create MMM-mymodule directory inside MagicMirror/modules
      2. Open MagicMirror directory in sublime
      3. Add barebones config for the module to modules array in config.js, for example:
      {
      	module: "MMM-mymodule",
      	position: "bottom_right",
      	config : {
      		
      	}
      },
      
      1. Start node serveronly and point my Chrome with dev tools open to the http://localhost:8080
      2. Create/edit MagicMirror/modules/MMM-mymodule/MMM-mymodule.js, save it. (or other files that you need for the module)
      3. Refresh the browser to pickup my changes, debug etc.
      4. Repeat steps 5-6 as I go along. If adding/editing node_helper.js repeat steps 4-6 since node needs to pickup that file.

      Some of restarts/refreshes can be automated on file save with different tools, but I’m not going to get into that right now.

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