Closed mattma closed 9 years ago
Thank you for the well-explained pull request. However, I would prefer to not include this in the base almond.js as I would not want other almond consumers to depend on this. The "seen" is also concerning on a basic AMD module level. Not sure that should be needed, and feels outside the contract promised by AMD loaders.
You could provide your own copy/fork though, and it could be an automated concatenation, to save you some manual work. This sort of file could be appended to the base almond.js to get the same effect:
(function() {
var oldDefine = define,
seen = requirejs._eak_seen = {};
define = function(name, deps, callback) {
seen[name] = true;
return oldDefine(name, deps, callback);
};
define.amd = oldDefine.amd;
}());
Thank you for the code snippet. I will do just as you said. Thanks again. @jrburke
It works great. Thank you!
Hi @jrburke,
requirejs._eak_seen
option is used ONLY for Ember-CLI fashion application. In the current Ember-CLI, it uses custom AMD module loader loader.js. It essentially does the same thing that Almond is doing. Lightweight AMD module loader.The only difference that Loader.js is used inside Ember-Resolver so that It requires a custom
option
property called_eak_seen
. Used ONLY inside Ember application to determine that module is loaded, ready to be DI.Could we add the support for this property,
_eak_seen
. I have been used custom version for a while in my project ember-rocks and have to manually update myself each time when you release the new version. I want to take advantage of bower.json if possible so that I do not need to include a plainalmond.js
file.Hopefully that you could add this property to support Ember.js Application. Much appreciated.