A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Module programming preview, jsfiddle?
-
@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:
- Create
MMM-mymoduledirectory insideMagicMirror/modules - Open
MagicMirrordirectory in sublime - Add barebones config for the module to
modulesarray inconfig.js, for example:
{ module: "MMM-mymodule", position: "bottom_right", config : { } },- Start
node serveronlyand point my Chrome with dev tools open to thehttp://localhost:8080 - Create/edit
MagicMirror/modules/MMM-mymodule/MMM-mymodule.js, save it. (or other files that you need for the module) - Refresh the browser to pickup my changes, debug etc.
- Repeat steps 5-6 as I go along. If adding/editing
node_helper.jsrepeat 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.
- Create
