ember-cli-assets 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember/cli/assets/version.rb +1 -1
- data/lib/ember/cli/loader.rb +1 -1
- data/vendor/assets/ember/loader.js +15 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f45a1c928f042ba8e28988fb2e4e1c486b69a04b
|
4
|
+
data.tar.gz: 6f75587983ba9707f3c6f654617be1713fae28d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d85515cc6b060aa3a7dd1042c6536509fcfe3af35d7b9a509ba8a8a3e237fec1894c7d8cd8c59c996057fe3c639e4ca063c1d04ddaaf437863e6ed3a59dbefc
|
7
|
+
data.tar.gz: 2205442b8f364446a9189f9bb6a8d4e3d2e13f7951305c453100b32273a7ce8f4e69b3e17386c443ed79d9ae0faf1f24010b000811cf751704c79932b82cffec
|
data/lib/ember/cli/loader.rb
CHANGED
@@ -59,7 +59,6 @@ var loader, define, requireModule, require, requirejs;
|
|
59
59
|
this.module = { exports: {} };
|
60
60
|
this.callback = callback;
|
61
61
|
this.state = undefined;
|
62
|
-
this._require = undefined;
|
63
62
|
this.finalized = false;
|
64
63
|
this.hasExportsAsDep = false;
|
65
64
|
this.isAlias = alias;
|
@@ -120,10 +119,14 @@ var loader, define, requireModule, require, requirejs;
|
|
120
119
|
|
121
120
|
Module.prototype.makeRequire = function() {
|
122
121
|
var name = this.name;
|
123
|
-
|
124
|
-
return this._require || (this._require = function(dep) {
|
122
|
+
var r = function(dep) {
|
125
123
|
return require(resolve(dep, name));
|
126
|
-
}
|
124
|
+
};
|
125
|
+
r['default'] = r;
|
126
|
+
r.has = function(dep) {
|
127
|
+
return has(resolve(dep, name));
|
128
|
+
}
|
129
|
+
return r;
|
127
130
|
};
|
128
131
|
|
129
132
|
Module.prototype.build = function() {
|
@@ -208,7 +211,12 @@ var loader, define, requireModule, require, requirejs;
|
|
208
211
|
return parentBase.join('/');
|
209
212
|
}
|
210
213
|
|
214
|
+
function has(name) {
|
215
|
+
return !!(registry[name] || registry[name + '/index']);
|
216
|
+
}
|
217
|
+
|
211
218
|
requirejs.entries = requirejs._eak_seen = registry;
|
219
|
+
requirejs.has = has;
|
212
220
|
requirejs.unsee = function(moduleName) {
|
213
221
|
findModule(moduleName, '(unsee)').unsee();
|
214
222
|
};
|
@@ -222,7 +230,9 @@ var loader, define, requireModule, require, requirejs;
|
|
222
230
|
define('foo', function() {});
|
223
231
|
define('foo/bar', [], function() {});
|
224
232
|
define('foo/asdf', ['module', 'exports', 'require'], function(module, exports, require) {
|
225
|
-
require('foo/bar')
|
233
|
+
if (require.has('foo/bar')) {
|
234
|
+
require('foo/bar');
|
235
|
+
}
|
226
236
|
});
|
227
237
|
define('foo/baz', [], define.alias('foo'));
|
228
238
|
define('foo/quz', define.alias('foo'));
|