forked from neekey/relyJS
-
Notifications
You must be signed in to change notification settings - Fork 1
daxingplay/relyJS
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
##API https://github.com/neekey/relyJS/wiki ##reqJS UPDATE 添加了和nodejs同样的方式来导入模块 1. 导入模块 var module = $r.require('moduleName') 2. 模块写法 var hello = function(){ console.log('hello!'); }; exports.hello = hello; 3. 只能在以 $r.load 方法载入的js文件中使用 $r.require 方法 4. 之前嵌套模块导入 5. 包管理在研发中= = 6. 具体见test文件夹中的简单demo ##Description relyJS is used to load resources, and provides a simple way to import other script files within script file! This project is developed to solve the problem I encountered in my html5 game-project, which is i have to finished loading all the resource the game need. This project can be used to load the script files, plain data files (html, css, json), images, etc. ##Simple example: $r.load( { url: ['a.js', 'http://neekey.net/bg.png', '../html/b.html' ], callback: function( module, userData ){} }); alse we can import other resource like we do in JAVA or C++, simple like this: in a.js file : $r._rely(['b.js', '../c.js']); /* main code in a.js */
About
a resource loader for javascript
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published