davidjamesstone / superviews.js

Template engine targeting incremental-dom
http://davidjamesstone.github.io/superviews.js/playground/
246 stars 15 forks source link

option mode to export to amd like requirejs format #20

Closed alexsad closed 8 years ago

alexsad commented 8 years ago

Support to amd format format=amd

define(["exports",'incremental-dom'], function (exports,IncrementalDOM) {
    "use strict";
    var myWidget = (function () {
        function myWidget(data) {
            IncrementalDOM.elementOpen('div');
            IncrementalDOM.text('welcome, '+data.name);
            IncrementalDOM.elementClose('div');
        }
        return myWidget;
    }());
    exports.myWidget = myWidget;
});
alexsad commented 8 years ago

Thanks, to accept the merge request!!! A question, when we can get the version in npm with that new feature ?

davidjamesstone commented 8 years ago

No problem - thanks for the PR!

Just published to npm@2.0.1.

Cheers

Dave

alexsad commented 8 years ago

thanks, again great job!!!