Emberjs-RequireJS
Emberjs-RequireJS copied to clipboard
Add documentation
Your code is really useful to me and I've been attempting to use it with https://github.com/luan/ember-facebook but without any success.
Perhaps you'd consider adding basic instructions on how to properly load additional libraries and use mixins?
Yes, while I like the way the project is structured, there are many important details missing, that could be filled in with some useful comments to help get 'on-board' easier. For example, in main.js
(function(root) {
require(["config"], function(config) {
requirejs.config(config);
require(["App", "ember"], function(App, Ember) {
var app_name = config.app_name || "App";
root[app_name] = App = Ember.Application.create(App);
});
});
})(this);
Presumably this function is being called via
<script data-main="./scripts/main" src="./scripts/libs/requirejs/2.1.2/require.js"></script>
and root
is being passed in as this
- but, it's not really clear to the beginner why you are doing things this way.