JustinLove / Module

Homebrew Javascript require mechanism. Still a work in progress.

Clone this repository (size: 175.2 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/JustinLove/module/

Changed (Δ118 bytes):

raw changeset »

script/cgd/Module.js (1 lines added, 5 lines removed)

Up to file-list script/cgd/Module.js:

@@ -195,11 +195,7 @@ CGD.god = window;
195
195
      var tags = document.getElementsByTagName(tag);
196
196
      for (var i = 0;i < tags.length;i++) {
197
197
        var fullPath = tags[i][attr];
198
        if (fullPath.indexOf(this.root) == 0) {
199
          var relativePath = fullPath.substr(this.root.length);
200
        } else {
201
          var relativePath = fullPath;
202
        }
198
        var relativePath = fullPath.replace(this.root, '');
203
199
        var identifier = relativePath.replace(/\.(\w*)$/, '');
204
200
        new CGD.Dependency(identifier, tags[i].type).
205
201
          canonically(fullPath).