Created
November 18, 2011 13:40
-
-
Save markomanninen/1376487 to your computer and use it in GitHub Desktop.
Cannot find module './widgets/G'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root.load = (apis) -> | |
for api in apis | |
eval('root.'+api+' = require("./widgets/'+api+'").'+api) | |
return this |
yea, my apis argument wasn't an array, thats why error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
root.load = function(apis) {
var api, _i, _len;
for (_i = 0, _len = apis.length; _i < _len; _i++) {
api = apis[_i];
eval('root.' + api + ' = require("./widgets/' + api + '").' + api);
}
return this;
};