Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
});

```