This commit is contained in:
Michael Teeuw 2016-04-09 20:56:16 +02:00
parent a1b8d951c1
commit 5ede0d35f2

View File

@ -2,6 +2,54 @@
This document describes the way to develop your own MagicMirror² modules.
- [MagicMirror² Module Development Documentation](#)
- [Module structure](#)
- [Files](#)
- [Core module file: modulename.js](#)
- [Available module instance properties](#)
- [this.name](#)
- [this.identifier](#)
- [this.hidden](#)
- [this.config](#)
- [this.data](#)
- [defaults: {}](#)
- [Subclassable module methods](#)
- [init()](#)
- [start()](#)
- [getScripts()](#)
- [getStyles()](#)
- [getDom()](#)
- [notificationReceived(notification, payload, sender)](#)
- [socketNotificationReceived: function(notification, payload)](#)
- [Module instance methods](#)
- [this.file(filename)](#)
- [this.updateDom(speed)](#)
- [this.sendNotification(notification, payload)](#)
- [this.sendSocketNotification(notification, payload)](#)
- [this.hide(speed, callback)](#)
- [this.show(speed, callback)](#)
- [The Node Helper: node_helper.js](#)
- [Available module instance properties](#)
- [this.name](#)
- [this.path](#)
- [this.expressApp](#)
- [this.io](#)
- [Subclassable module methods](#)
- [init()](#)
- [start()](#)
- [socketNotificationReceived: function(notification, payload)](#)
- [Module instance methods](#)
- [this.sendSocketNotification(notification, payload)](#)
- [MagicMirror Helper Methods](#)
- [Module selection](#)
- [MM.getModules()](#)
- [.withClass(classnames)](#)
- [.exceptWithClass(classnames)](#)
- [.exceptModule(module)](#)
- [.enumerate(callback)](#)
- [MagicMirror Logger](#)
## Module structure
All modules are loaded in de `modules` folder. The default modules are grouped together in the `modules/default` folder. Your module should be placed in a subfolder of `modules`. Note that any file or folder your create in the `modules` folder will be ignored by git, allowing you to upgrade the MagicMirror² without the loss of your files.