Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A file and module loader for JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
adapt Use node 0.4.0 as baseline level of support, use vm modules intead of…
bin Use node 0.4.0 as baseline level of support, use vm modules intead of…
build task update, and fix issue where plugins that used a definition funct…
dist updating version number/docs in preparation of a release.
docs updating version number/docs in preparation of a release.
require task update, and fix issue where plugins that used a definition funct…
tests Update tests readme to be accurate, fix jquery-require-sample to use …
.gitignore Make sure to skip extraneous doh setup for adapter test, exclude buil…
LICENSE Update copyright year
README.md
index.html doc tweaks
require.js updating version number/docs in preparation of a release.
tasks.txt updating version number/docs in preparation of a release.
testBaseUrl.js

README.md

RequireJS

RequireJS loads plain JavaScript files as well as more defined modules. It is optimized for in-browser use, including in a Web Worker, but it can be used in other JavaScript environments, like Rhino and Node. It implements the Asynchronous Module API.

RequireJS uses plain script tags to load modules/files, so it should allow for easy debugging. It can be used simply to load existing JavaScript files, so you can add it to your existing project without having to re-write your JavaScript files.

RequireJS includes an optimization tool you can run as part of your packaging steps for deploying your code. The optimization tool can combine and minify your JavaScript files to allow for better performance.

If the JavaScript file defines a JavaScript module via define(), then there are other benefits RequireJS can offer: better CommonJS support and loading multiple versions of a module in a page. RequireJS also has a plugin system that supports features like i18n string bundles, and text file dependencies.

RequireJS does not have any dependencies on a JavaScript framework. It is dual-licensed -- new BSD or MIT.

The standard require.js file is around 5KB when minified via Closure Compiler and gzipped.

RequireJS works in IE 6+, Firefox 2+, Safari 3.2+, Chrome 3+, and Opera 10+.

Latest Release: 0.22.0

Something went wrong with that request. Please try again.