Skip to content
A tiny, simple CommonJS require() implemetation in browser-side
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE first commit May 22, 2015
README.md first commit May 22, 2015
bower.json first commit May 22, 2015
package.json first commit May 22, 2015
require.js

README.md

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

You can’t perform that action at this time.