#GoJS
GoJS is a JavaScript module loader for web, which can organize your codes and modules in a elegant way. It solves the problem of module dependencies and naming conflicts, but also solves the difficulty in merging compaction beside the other similar frameworks, so you can make your coding more enjoyable.
##Usage
###1st Step, Initialize GoJS
<!--
data-main: The entry module
-->
<script id="gojsnode" src="path/to/go.js" data-main="main"></script>
You can also configure it before the initialization:
<script src="path/to/go.js"></script>
<script>
// Configure GoJS
gojs.config({
// some options
});
// Load main module
gojs.use('main');
</script>
###2nd Step, Write Modules Following CMD Standard
// main.js
define(function(require, exports, module){
var foo = require('foo');
foo.bar();
});
// foo.js
define(function(require, exports, module){
exports.bar = function(){
// your codes
}
});
###3st Step, Enjoy!
##Compatibility
GoJS compatible with all major browsers:
Chrome 3+
Firefox 2+
Safari 3.2+
Opera 9+
IE 5.5+
In theory, GoJS can be run in any browser.
##License
GoJS is available under the terms of the MIT License, it free for anyone to use.
##What's More
Finally, a tribute to RequireJS and Sea.js, but also to pay tribute to all the people who work dedicated to open source.
—— Lanfei on November 5, 2014