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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b897477f94bc19709030dfdcfdcfb625d8b14156
4
- data.tar.gz: 0bbaba61b1f5a1a77b2922566c6606f34c75cad8
3
+ metadata.gz: f45a1c928f042ba8e28988fb2e4e1c486b69a04b
4
+ data.tar.gz: 6f75587983ba9707f3c6f654617be1713fae28d6
5
5
  SHA512:
6
- metadata.gz: 4c1df6d52a62d9e3243a15b8cab43eccdb1a812466b7ed75756889dddf1feb50fd4c510f494954d3b1d53506c642bbf1b59c0d4da4854aadb77099562fc28258
7
- data.tar.gz: 97eb8a779e2026563ef27ea72b90304e2f893de6b0520bea28536b3626db11dc54a31c9deb85ea9da1f64c04902999e0f7093ee38e7e9892e27c3cba1934110b
6
+ metadata.gz: 3d85515cc6b060aa3a7dd1042c6536509fcfe3af35d7b9a509ba8a8a3e237fec1894c7d8cd8c59c996057fe3c639e4ca063c1d04ddaaf437863e6ed3a59dbefc
7
+ data.tar.gz: 2205442b8f364446a9189f9bb6a8d4e3d2e13f7951305c453100b32273a7ce8f4e69b3e17386c443ed79d9ae0faf1f24010b000811cf751704c79932b82cffec
@@ -1,7 +1,7 @@
1
1
  module Ember
2
2
  module CLI
3
3
  module Assets
4
- VERSION = '0.0.26'
4
+ VERSION = '0.0.27'
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Ember
2
2
  module CLI
3
3
  module Loader
4
- VERSION = '4.0.2'
4
+ VERSION = '4.0.3'
5
5
  end
6
6
  end
7
7
  end
@@ -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'));
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-cli-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO