Download RequireJS

Latest Release: 0.24.0§ 1

require.js Minified With Comments

All you need to start using require.js in the browser.

Sample RequireJS + jQuery 1.5.1 project Download

A zip file containing a sample project that uses jQuery and RequireJS.

RequireJS adapter for Node and Rhino

r.js: use this file if you want to code to the RequireJS module format in Node or Rhino.

Use in Node

Requires Node 0.4.0 or higher. The Node instructions explain how to use it. It includes all the code needed for RequireJS to function with Node.

index.js: the standard HTTP server-based Hello World app for Node, but coded to work with the r.js adapter. Download it in the same directory as r.js and then run this command:

node r.js index.js

Then you can go to http://127.0.0.1:8000/ and see "Hello World" printed after about 2 seconds.

Use in Rhino

The r.js adapter also runs under Rhino. Use it like so, where main.js is your application's top level file:

java -jar path/to/rhino/js.jar r.js main.js

Optimization Tool / Full Source Download

A zip file that is the optimization tool for RequireJS. It also includes the full source for RequireJS.

Plugins§ 2

These are useful loader plugins that have the same license terms as require.js itself. Download the plugin file and place it as a sibling to your "data-main" main.js script.

text Minified With Comments

Load text files and treat them as dependencies. Great for loading templates. The text strings can be inlined in an optimized build when the optimizer is used.

order Minified With Comments

Load script in the order specified in the dependency array. Useful for existing scripts that have implied dependencies instead of calling define() to create modular code.

cs (CoffeeScript) With Comments

Load files written in CoffeeScript. Includes a version of CoffeeScript, only this one file is needed. With this plugin, it is easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino via the RequireJS adapter. This is the best way to do cross-environment, modular CoffeeScript. The project home has more information on how to use it.

i18n Minified With Comments

Load string bundles used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.

Previous releases§ 3

0.23.0

0.22.0

0.2.1 (should have been 0.21.0)

0.2.0 (should have been 0.20.0)

0.15.0

0.14.5

0.14.4

0.14.3

0.14.2

0.14.1

0.14.0

0.13.0

0.12.0