Skip to content

ruanyf/tiny-browser-require

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 22, 2015
beea9f5 · May 22, 2015

History

1 Commit
May 22, 2015
May 22, 2015
May 22, 2015
May 22, 2015
May 22, 2015

Repository files navigation

Tiny Browser Require

A tiny, simple CommonJS require() implemetation in browser-side, only 30+ lines.

Usage

First put require.js on your page.

<script src="require.js" />

Then use require.register to register your module.

require.register("browser/debug.js", function(module, exports, require){
  // Module code goes here
});

Now you can use require function to load the module.

var debug = require("browser/debug.js");

License

MIT

About

A tiny, simple CommonJS require() implemetation in browser-side

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published