Fork me on GitHub

Quick Introduction

The hasty coder intro

Why ?

The main drive behind uRequire is to enable you to :

  • author boilerplate-free modular javascript code once and DRY.

  • seamlessly execute (& test it) everywhere (i.e browser & nodejs).

Wheels are turning

uRequire isnt reinventing the wheel. Its not proposing yet another modules system or a non standard bloated way to stitch code together. Its premise is build on standard exisitng technologies, namely CommonJS (i.e nodejs require('')) and AMD (i.e RequireJS define([], fn)).

With a simple build step, uRequire converts your modules to UMD (or AMD, nodejs or 'combined.js') using static code analysis, a code generation template system and build/runtime dependency path resolution along with other build & runtime goodies.

How ?

Your source can be written either in the 'strict' AMD format define([], function(){}) or the nodejs/commonjs require('dep').

But, you can also use a relaxed or hybrid Universal Module Format, for example using asynchronous require([], fn)s everywhere) and extra kinky features.

uRequire converts it to suitable UMD (or other) format that can be deployed everywhere.

But it does more than just converting modules {from: ['AMD', 'commonjs'], to: ['AMD', 'commonjs', 'UMD', '<script>']} - keep reading.

Extras ? Kinky ?

{"uDeclare": "uRequire does all this magic for you."}