# GoJS
**Repository Path**: lanfei/GoJS
## Basic Information
- **Project Name**: GoJS
- **Description**: 一个基于 CMD 规范的 JavaScript 模块加载器。
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: http://lanfei.github.io/GoJS/
- **GVP Project**: No
## Statistics
- **Stars**: 5
- **Forks**: 3
- **Created**: 2014-10-14
- **Last Updated**: 2024-04-18
## Categories & Tags
**Categories**: javascript-toolkits
**Tags**: None
## README
#GoJS
GoJS 是一个适用于 Web 的 JavaScript 模块加载器,它可以帮助你更优雅地组织代码和模块。它解决了模块之间的依赖问题和命名冲突问题,同时也解决了同类框架中合并压缩成本高的问题,让你能够更加轻松愉快地享受编码的乐趣。[**README in English**](https://github.com/Lanfei/GoJS/blob/master/README_EN.md)
##如何使用
###第一步,初始化GoJS
```html
```
或者 [进行配置](http://lanfei.github.io/GoJS/docs/index.html#config) 后再初始化入口模块:
```html
```
###第二步,编写遵循 [CMD规范](http://lanfei.github.io/GoJS/docs/index.html#cmd) 的模块
```js
// main.js
define(function(require, exports, module){
var foo = require('foo');
foo.bar();
});
```
```js
// foo.js
define(function(require, exports, module){
exports.bar = function(){
// your codes
}
});
```
###第三步,享受编码的乐趣吧!
##兼容性
GoJS兼容所有主流浏览器:
```
Chrome 3+
Firefox 2+
Safari 3.2+
Opera 9+
IE 5.5+
```
理论上,GoJS可以运行在任何浏览器环境上。
##开源许可
GoJS遵循 [MIT 协议](https://github.com/Lanfei/GoJS/blob/master/LICENSE),无论个人还是公司,都可以免费自由地使用。
##说点什么
> 最后,向 RequireJS 和 Sea.js 致敬,也向所有投身于开源工作的自由人致敬。
—— 张耕畅 于2014年11月05日