Add module subfolder support.

This commit is contained in:
Michael Teeuw 2016-04-01 17:35:29 +02:00
parent 671338425a
commit e4c54cc655
27 changed files with 56 additions and 21 deletions

View 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;
}
});