Skip to content

dim-team/md.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Module definition framework

Usage

index.html

<script src="md.js"></script>

<script>
//define a module
define('sayHi', function(require, exports, module){
    //export a function
    module.exports = function(msg){
        console.log('hi, %s', msg);
    };
});
</script>

<script>
define(function(require){
    //require module
    var hi = require('sayHi');
    hi('Jerrold'); // hi, Jerrold
});
</script>

Releases

No releases published

Packages

No packages published