Emberjs-RequireJS icon indicating copy to clipboard operation
Emberjs-RequireJS copied to clipboard

Add documentation

Open rpharrison opened this issue 11 years ago • 1 comments

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?

rpharrison avatar Jan 22 '14 21:01 rpharrison

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.

kolotyluk avatar Jun 13 '14 19:06 kolotyluk