{"id":13481158,"url":"https://github.com/yanhaijing/lodjs","last_synced_at":"2025-04-07T09:20:01.162Z","repository":{"id":25950320,"uuid":"29391926","full_name":"yanhaijing/lodjs","owner":"yanhaijing","description":"JavaScript模块加载器，基于AMD。迄今为止，对AMD理解最好的实现。","archived":false,"fork":false,"pushed_at":"2022-11-07T01:53:30.000Z","size":58,"stargazers_count":291,"open_issues_count":1,"forks_count":51,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-31T07:08:18.698Z","etag":null,"topics":["amd","amd-specifications","dependency-injection","loader"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanhaijing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-17T13:28:13.000Z","updated_at":"2024-11-06T11:23:39.000Z","dependencies_parsed_at":"2023-01-14T03:44:51.270Z","dependency_job_id":null,"html_url":"https://github.com/yanhaijing/lodjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Flodjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Flodjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Flodjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Flodjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanhaijing","download_url":"https://codeload.github.com/yanhaijing/lodjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622983,"owners_count":20968575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amd","amd-specifications","dependency-injection","loader"],"created_at":"2024-07-31T17:00:49.236Z","updated_at":"2025-04-07T09:20:01.133Z","avatar_url":"https://github.com/yanhaijing.png","language":"JavaScript","funding_links":[],"categories":["Loaders","Loaders [🔝](#readme)","加载器"],"sub_categories":[],"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)\n\n[Chinese README](https://github.com/yanhaijing/lodjs/blob/master/README_CN.md) \n\nThe 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.\n\n## Function Overview\n\n100% 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.\n\n## Characteristics\n\n- Modular Development Support\n- Asynchronous loading\n- Dependency injection\n- Flexible custom functionality\n\n## Compatibility\n\n- Safari 6+ (Mac)\n- iOS 5+ Safari\n- Chrome 23+ (Windows, Mac, Android, iOS, Linux, Chrome OS)\n- Firefox 4+ (Windows, Mac, Android, Linux, Firefox OS)\n- Internet Explorer 6+ (Windows, Windows Phone)\n- Opera 10+ (Windows, linux, Android)\n\n## How to Use?\n\n### Traditional Usage\n\t\n\t\u003cscript src=\"lodjs.js\"\u003e\u003c/script\u003e\n\n### Bower\n\n\t$ bower install lodjs\n\t$ bower install git://github.com/yanhaijing/lodjs.git\n\n## Quick Start\n\n### Define Module\n\nWe use lodJS's global function define to define a module, for example, in mod.js, we have the following code:\n\n\tdefine(function () {\n\t\treturn 123;\n\t});\n\n### Module Usage\n\nThe use method in lodJS uses a module. The following code can use the module defined above:\n\n\tlodjs.use('mod', function (mod) {\n\t\tconsole.log(mod);// Outputs 123\n\t});\n\nFor more examples, please see the directory of [demo](demo).\n\n## Document\n\n[API](doc/api.md)\n\n## Contribution Guide\n\nIf 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.\n\n### Publish Bower\n\t\n\t$ bower register lodjs git://github.com/yanhaijing/lodjs.git\n\n## Report Issues\n\n- [Issues](https://github.com/yanhaijing/lodjs/issues \"报告问题\")\n\n## Author\n\n**yanhaijing**\n\n- [Weibo](http://weibo.com/yanhaijing1234 \"yanhaijing's Weibo\")\n- [Email](mailto:yanhaijing@yeah.net \"yanhaijing's Email\")\n- [Blog](http://yanhaijing.com \"yanhaijing's Blog\")\n\n## Update Log\n\n[Update Log](CHANGELOG.md)\n\n## Related Links\n\n### AMD Specifications\n- [AMD Specifications](https://github.com/amdjs/amdjs-api/blob/master/AMD.md)\n- [AMD Specifications (Chinese Version)](https://github.com/amdjs/amdjs-api/wiki/AMD-(%E4%B8%AD%E6%96%87%E7%89%88))\n- [AMD Require](https://github.com/amdjs/amdjs-api/wiki/require)\n- [AMD Common-Config](https://github.com/amdjs/amdjs-api/wiki/Common-Config)\n- [AMD Loader-Plugins](https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins)\n\n### AMD Implementation\n- [requirejs Official Webpage](http://requirejs.org/)\n- [requirejs Chinese Webpage](http://requirejs.cn/)\n- [curl.js](https://github.com/cujojs/curl)\n- [modJS](https://github.com/fex-team/mod)\n- [ESL](https://github.com/ecomfe/esl)\n- [loader.js](https://github.com/ember-cli/loader.js)\n- [define.js](https://github.com/fixjs/define.js)\n\n### CMD\n- [CMD Specifications](https://github.com/cmdjs/specification/blob/master/draft/module.md)\n- [seajs Official Webpage](http://seajs.org/docs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanhaijing%2Flodjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanhaijing%2Flodjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanhaijing%2Flodjs/lists"}