node package manager

presenter

Extendable JavaScript class that can load snippets of HTML and CSS

presenter.js

Simple presenter class that can be extended and can load CSS and templates.

define([
    "presenter",
    "text!./MyModule.html",
    "text!./MyModule.css"
], function(Presenter, template, style) {
    
    return Presenter.extend({
        template: template,
        style: style,
 
        init: function(options) {
            this.el.textContent = options.message;
        }
 
    });
 
});
var instance = new MyModule({
    message: "Hello World!"
});
instance.attach(document.body);