Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a requireAll to minispade

  • Loading branch information...
commit d70b8e369efb9fe829b478f2418a8e32098c5b40 1 parent 4bccae7
@wycats authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/main.js
View
8 lib/main.js
@@ -43,6 +43,14 @@ if (typeof document !== "undefined") {
return loaded;
},
+ requireAll: function(regex) {
+ for (var module in this.modules) {
+ if (!this.modules.hasOwnProperty(module)) { continue; }
+ if (regex && !regex.test(module)) { continue; }
+ minispade.require(module);
+ }
+ },
+
register: function(name, callback) {
minispade.modules[name] = callback;
}
Please sign in to comment.
Something went wrong with that request. Please try again.