mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
commit
b50d31ffe2
@ -2,6 +2,30 @@
|
|||||||
|
|
||||||
This document describes the way to develop your own MagicMirror² modules.
|
This document describes the way to develop your own MagicMirror² modules.
|
||||||
|
|
||||||
|
Table of Contents:
|
||||||
|
|
||||||
|
- Module structure
|
||||||
|
- Files
|
||||||
|
|
||||||
|
- The Core module file: modulename.js
|
||||||
|
- Available module instance properties
|
||||||
|
- Subclassable module methods
|
||||||
|
- Module instance methods
|
||||||
|
- Visibility locking
|
||||||
|
|
||||||
|
- The Node Helper: node_helper.js
|
||||||
|
- Available module instance properties
|
||||||
|
- Subclassable module methods
|
||||||
|
- Module instance methods
|
||||||
|
|
||||||
|
- MagicMirror Helper Methods
|
||||||
|
- Module Selection
|
||||||
|
|
||||||
|
- MagicMirror Logger
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
## General Advice
|
## General Advice
|
||||||
|
|
||||||
As MagicMirror has gained huge popularity, so has the number of available modules. For new users and developers alike, it is very time consuming to navigate around the various repositories in order to find out what exactly a certain modules does, how it looks and what it depends on. Unfortunately, this information is rarely available, nor easily obtained without having to install it first.
|
As MagicMirror has gained huge popularity, so has the number of available modules. For new users and developers alike, it is very time consuming to navigate around the various repositories in order to find out what exactly a certain modules does, how it looks and what it depends on. Unfortunately, this information is rarely available, nor easily obtained without having to install it first.
|
||||||
@ -26,7 +50,7 @@ A module can be placed in one single folder. Or multiple modules can be grouped
|
|||||||
- **modulename/public** - Any files in this folder can be accesed via the browser on `/modulename/filename.ext`.
|
- **modulename/public** - Any files in this folder can be accesed via the browser on `/modulename/filename.ext`.
|
||||||
- **modulename/anyfileorfolder** Any other file or folder in the module folder can be used by the core module script. For example: *modulename/css/modulename.css* would be a good path for your additional module styles.
|
- **modulename/anyfileorfolder** Any other file or folder in the module folder can be used by the core module script. For example: *modulename/css/modulename.css* would be a good path for your additional module styles.
|
||||||
|
|
||||||
## Core module file: modulename.js
|
## The Core module file: modulename.js
|
||||||
This is the script in which the module will be defined. This script is required in order for the module to be used. In it's most simple form, the core module file must contain:
|
This is the script in which the module will be defined. This script is required in order for the module to be used. In it's most simple form, the core module file must contain:
|
||||||
````javascript
|
````javascript
|
||||||
Module.register("modulename",{});
|
Module.register("modulename",{});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user