https://github.com/rezigned/require
Provide a modular way to create javascirpt module with ease.
https://github.com/rezigned/require
Last synced: about 1 year ago
JSON representation
Provide a modular way to create javascirpt module with ease.
- Host: GitHub
- URL: https://github.com/rezigned/require
- Owner: rezigned
- Created: 2011-09-12T08:31:50.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-09-12T16:02:37.000Z (over 14 years ago)
- Last Synced: 2025-02-03T22:59:19.478Z (about 1 year ago)
- Language: JavaScript
- Size: 85.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
Awesome Lists containing this project
README
h1. JS Require (Alpha)
Create a modular javascript module with ease.
h2. License
wtf
h2. Company
"Landau Reece.":http://www.landaureece.com
h2. Usage
// define a new module
require(function(){
var Ajax = {
// your code ...
};
var AwesomeAjax = (function(){
// your code
});
return {
// this is your module's namespace
namespace: 'ajax',
// these will expose to the outside world
Ajax: Ajax,
Ajax2: AwesomeAjax
}
});
// usage
var aj = require('ajax').Ajax;
// or another way
var aj = require('ajax.Ajax');
aj.get('http://google.com');
h2. New features to implement
# load other resources