Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanhaijing/lodjs
JavaScript模块加载器,基于AMD。迄今为止,对AMD理解最好的实现。
https://github.com/yanhaijing/lodjs
amd amd-specifications dependency-injection loader
Last synced: 1 day ago
JSON representation
JavaScript模块加载器,基于AMD。迄今为止,对AMD理解最好的实现。
- Host: GitHub
- URL: https://github.com/yanhaijing/lodjs
- Owner: yanhaijing
- License: mit
- Created: 2015-01-17T13:28:13.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-11-07T01:53:30.000Z (about 2 years ago)
- Last Synced: 2025-01-17T06:05:21.269Z (9 days ago)
- Topics: amd, amd-specifications, dependency-injection, loader
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 291
- Watchers: 33
- Forks: 51
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
- A-collection-of-awesome-browser-side-JavaScript-libraries-resources-and-shiny-things. - LodJS - Module loader based on AMD. (Loaders)
- awesome-javascript - LodJS - JavaScript模块加载器,基于AMD。迄今为止,对AMD理解最好的实现。 (Loaders [🔝](#readme))
- awesome-javascript-cn - LodJS
- awesome-javascript - lodjs - JavaScript模块加载器,基于AMD。迄今为止,对AMD理解最好的实现。 - ★ 290 (Loaders)
- awesome-javascript - LodJS - Module loader based on AMD. (Loaders)
README
# [lodJS](https://github.com/yanhaijing/lodjs) [![release](https://img.shields.io/badge/release-v0.1.0-orange.svg)](https://github.com/yanhaijing/template.js/releases/tag/v0.1.0) [![license](http://img.shields.io/npm/l/express.svg)](https://github.com/yanhaijing/lodjs/blob/master/MIT-LICENSE.txt)
[Chinese README](https://github.com/yanhaijing/lodjs/blob/master/README_CN.md)
The JavaScript module loader is based on [AMD] (https://github.com/amdjs/amdjs-api/blob/master/AMD.md). lodJS is the best implemented understanding of [AMD] (https://github.com/amdjs/amdjs-api/blob/master/AMD.md) up to now.
## Function Overview
100% supports [AMD](https://github.com/amdjs/amdjs-api/blob/master/AMD.md) specifications. Supports modular development. When a module is defined, modules can be used without maintaining a dependent module, just write a dependency, and lodJS will automatically be responsible for the dependency injection.
## Characteristics
- Modular Development Support
- Asynchronous loading
- Dependency injection
- Flexible custom functionality## Compatibility
- Safari 6+ (Mac)
- iOS 5+ Safari
- Chrome 23+ (Windows, Mac, Android, iOS, Linux, Chrome OS)
- Firefox 4+ (Windows, Mac, Android, Linux, Firefox OS)
- Internet Explorer 6+ (Windows, Windows Phone)
- Opera 10+ (Windows, linux, Android)## How to Use?
### Traditional Usage
### Bower
$ bower install lodjs
$ bower install git://github.com/yanhaijing/lodjs.git## Quick Start
### Define Module
We use lodJS's global function define to define a module, for example, in mod.js, we have the following code:
define(function () {
return 123;
});### Module Usage
The use method in lodJS uses a module. The following code can use the module defined above:
lodjs.use('mod', function (mod) {
console.log(mod);// Outputs 123
});For more examples, please see the directory of [demo](demo).
## Document
[API](doc/api.md)
## Contribution Guide
If you want to contribute code for lodJS, please use fork + pull request method, ensuring that before you launch pr, you rebase code on the master branch to your own branch.
### Publish Bower
$ bower register lodjs git://github.com/yanhaijing/lodjs.git## Report Issues
- [Issues](https://github.com/yanhaijing/lodjs/issues "报告问题")
## Author
**yanhaijing**
- [Weibo](http://weibo.com/yanhaijing1234 "yanhaijing's Weibo")
- [Email](mailto:[email protected] "yanhaijing's Email")
- [Blog](http://yanhaijing.com "yanhaijing's Blog")## Update Log
[Update Log](CHANGELOG.md)
## Related Links
### AMD Specifications
- [AMD Specifications](https://github.com/amdjs/amdjs-api/blob/master/AMD.md)
- [AMD Specifications (Chinese Version)](https://github.com/amdjs/amdjs-api/wiki/AMD-(%E4%B8%AD%E6%96%87%E7%89%88))
- [AMD Require](https://github.com/amdjs/amdjs-api/wiki/require)
- [AMD Common-Config](https://github.com/amdjs/amdjs-api/wiki/Common-Config)
- [AMD Loader-Plugins](https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins)### AMD Implementation
- [requirejs Official Webpage](http://requirejs.org/)
- [requirejs Chinese Webpage](http://requirejs.cn/)
- [curl.js](https://github.com/cujojs/curl)
- [modJS](https://github.com/fex-team/mod)
- [ESL](https://github.com/ecomfe/esl)
- [loader.js](https://github.com/ember-cli/loader.js)
- [define.js](https://github.com/fixjs/define.js)### CMD
- [CMD Specifications](https://github.com/cmdjs/specification/blob/master/draft/module.md)
- [seajs Official Webpage](http://seajs.org/docs/)