I am quite confused as how to best use this library. It appears that we have to require JS.Class in order to use anything. I couldn't find any reference to this in the documentation. This is what I have:
JS.Packages(function() { with(this) {
file("
https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js")
.provides('jQuery')
.requires("JS.Class");
file("/red.js")
.provides("Red")
.requires("JS.Class");
file("/blue.js")
.provides("Blue")
.requires("JS.Class");
file('/app.js')
.provides('Application')
.requires('jQuery')
.uses("Red")
.uses("Blue")
}});
JS.require("Application", function() {
var app = new Application();
console.log("Application loaded");
});
Is this the proper way to do things? Will I have to require('JS.Class') on each of my files? If I put the require with the Application provider, I often get JS.Class not loaded errors.