All you need to start using require.js in the browser.
A zip file containing a sample project that uses jQuery and RequireJS.
The r.js file allows you to run the optimizer as well as run modules in Node or Rhino.
If you are running in Node, and want to use npm to install this file via npm, see the Use with Node page for more information.
For information on its use, as well as how to get the JAR files to run it under Rhino, see the r.js README.
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.
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.
Wait for the DOM is ready. Useful for pausing execution of top level application logic until the DOM is ready for querying/modification.
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.
Load string bundles used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.
Small bug fixes to:
Small bug fixes to:
Main purpose of the release is to fix a regression in 1.0.5 where the optimizer's "dir" config option was not applied correctly when passed on the command line.
The other notable change: the optimizer now supports onBuildRead and onBuildWrite functions that are called when JS modules are read or written for an optimized build layer. This allows doing some regexp work to modify their contents.
Small bug fixes to:
Small bug fixes to:
Small bug fixes to:
Small bug fixes to:
Small bug fixes to:
Just small bug fixes related to:
Detailed list of changes for require.js and the r.js optimizer: