mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
Add module subfolder support.
This commit is contained in:
27
modules/default/helloworld/helloworld.js
Normal file
27
modules/default/helloworld/helloworld.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/* global Module */
|
||||
|
||||
/* Magic Mirror
|
||||
* Module: HelloWorld
|
||||
*
|
||||
* By Michael Teeuw http://michaelteeuw.nl
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
Module.register('helloworld',{
|
||||
|
||||
// Default module config.
|
||||
defaults: {
|
||||
text: "Hello World!",
|
||||
classes: "normal medium"
|
||||
},
|
||||
|
||||
// Override dom generator.
|
||||
getDom: function() {
|
||||
var wrapper = document.createElement("div");
|
||||
wrapper.className = this.config.classes;
|
||||
wrapper.innerHTML = this.config.text;
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user