Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fouber/md.js
a very simple module definition framework, just module definition.
https://github.com/fouber/md.js
Last synced: 5 days ago
JSON representation
a very simple module definition framework, just module definition.
- Host: GitHub
- URL: https://github.com/fouber/md.js
- Owner: fouber
- Created: 2014-06-06T17:05:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-24T15:18:39.000Z (about 9 years ago)
- Last Synced: 2024-05-13T05:09:43.349Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 158 KB
- Stars: 13
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Module definition framework
[![Build Status](https://travis-ci.org/fouber/md.js.svg?branch=master)](https://travis-ci.org/fouber/md.js)
## Usage
### index.html
```html
//define a module
define('sayHi', function(require, exports, module){
//export a function
module.exports = function(msg){
console.log('hi, %s', msg);
};
});define(function(require){
//require module
var hi = require('sayHi');
hi('fouber'); // hi, fouber
});```