-
We talked about modules exporting their objects, rather than tacking them onto some global namespace object (
window.Ember
) as a side effect of loading the module. Do we have any nice patterns to translate a modules that register stuff (e.g. https://github.com/SlexAxton/require-handlebars-plugin/blob/master/demo/template/helpers/yeller.js) into a side-effect-free syntax? -
Let's assume module "foo" registers something global as a side effect. Do I read http://wiki.ecmascript.org/doku.php?id=harmony:modules#external_module_load correctly that
import "foo"
will not only fetch "foo" at compile time, but also run the "foo" module at run time, if it hasn't already run? (So any global side effects will have happened afterimport "foo"
.) -
Rails auto-loads all my Ruby files. That's super-convenient. Also for JavaScript, the Rails asset pipeline not only has
//= require foo
(which becomesimport "foo"
), but//= require_tree .
. Obviously there is no 1:1 equivalent forrequire_tree
, but do we have any kind of strategy/story for this?
Last active
December 18, 2015 14:49
-
-
Save joliss/5799831 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just had a conversation with Stefan. Summary re the questions in this gist: