Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lin-xi/module
javascript module.js
https://github.com/lin-xi/module
Last synced: 15 days ago
JSON representation
javascript module.js
- Host: GitHub
- URL: https://github.com/lin-xi/module
- Owner: lin-xi
- Created: 2015-08-28T08:32:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-28T08:54:38.000Z (over 9 years ago)
- Last Synced: 2024-11-11T09:44:38.306Z (2 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# module
javascript module.jsjavascript module framework
key word: module, require, use
no configuration
##usage:
1. define a module
### /core/Base.js
```
module(function(){
'use strict';
....
});
```2. require a module in another module
### /dust.js
```
var dust = {
"core": require('./core/Base')
};```
3. require a module in common js file
```
use('/core/Base.js', function(Base){
var base = new Base();
});
```