mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 17:44:52 -04:00
Add module subfolder support.
This commit is contained in:
parent
671338425a
commit
e4c54cc655
27 changed files with 56 additions and 21 deletions
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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue