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…
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: improvements over traditional CommonJS modules
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.
RequireJS works in IE 6+, Firefox 2+, Safari 3.2+, Chrome 3+, and Opera 10+.
License
MIT
Code of Conduct
jQuery Foundation Code of Conduct.
Directories
- dist: Scripts and assets to generate the requirejs.org docs, and for
- docs: The raw HTML files for the requirejs.org docs. Only includes the
- tests: Tests for require.js.
- testBaseUrl.js: A file used in the tests inside tests. Purposely
- updatesubs.sh: Updates projects that depend on require.js Assumes the
Tests
This repo assumes some other repos are checked out as siblings to this repo:
git clone https://github.com/requirejs/text.git
git clone https://github.com/requirejs/i18n.git
git clone https://github.com/requirejs/domReady.git
git clone https://github.com/requirejs/requirejs.git
So when the above clones are done, the directory structure should look like:
- domReady
- i18n
- text
- requirejs (this repo)
Serve the directory with these 4 siblings from a web server. It can be a local web server.
Open requirejs/tests/index.html in all the browsers, click the arrow button to run all
the tests.
-
requirejs
A file and module loader for JavaScript
JavaScript ★ 13k 6mo agoExplain → -
r.js
Runs RequireJS in Node and Rhino, and used to run the RequireJS optimizer
JavaScript ★ 2.6k 6mo agoExplain → -
almond
A minimal AMD API implementation for use after optimized builds
JavaScript ★ 2.4k 6y agoExplain → -
text
An AMD loader plugin for loading text resources
JavaScript ★ 924 7y agoExplain → -
example-multipage
Example RequireJS-based project that has multiple pages that share a common set of modules.
JavaScript ★ 836 7y agoExplain → -
example-multipage-shim
Example RequireJS-based project that has multiple pages that share a common set of modules with shim config
JavaScript ★ 378 7y agoExplain → -
require-cs
An AMD loader plugin for CoffeeScript
JavaScript ★ 335 8y agoExplain → -
require-jquery
A RequireJS+jQuery sample project
JavaScript ★ 259 10y agoExplain → -
alameda
AMD loader, like requirejs, but with promises and for modern browsers
JavaScript ★ 193 6y agoExplain → -
example-jquery-shim
Example project that uses jQuery and jQuery plugins via shim config
JavaScript ★ 188 7y agoExplain → -
domReady
An AMD loader plugin for detecting DOM ready
JavaScript ★ 181 5y agoExplain → -
example-jquery-cdn
Example project that uses jQuery and jQuery plugins wrapped as modules
JavaScript ★ 150 4y agoExplain → -
cajon
JavaScript module loader for the browser that can load CommonJS/node and AMD modules
JavaScript ★ 118 8y agoExplain → -
i18n
An AMD loader plugin for loading internationalization/localization string resources
JavaScript ★ 98 10y agoExplain → -
xrayquire
An auxillary script that gives extra info on the use of requirejs in a web page.
JavaScript ★ 73 9y agoExplain → -
example-libglobal
Use AMD modules to develop a JS library that builds to a lib that can be used by "globals only" scripts or as an AMD module
JavaScript ★ 61 6y agoExplain → -
element
An AMD loader plugin for custom elements
JavaScript ★ 56 10y agoExplain → -
requirejs-bower
Repo hold assets for publishing to the bower package manager.
JavaScript ★ 34 6mo agoExplain → -
requirejs-npm
Wrappers to allow using RequireJS-related scripts
JavaScript ★ 23 6mo agoExplain → -
step
AMD loader plugin that takes a step config to know how to sequential load some files
JavaScript ★ 20 10y agoExplain → -
prim
Promise lib for use inside requirejs-related projects
JavaScript ★ 7 10y agoExplain → -
requirejs-branding
Branding/images/design for RequireJS web site
CSS ★ 6 12y agoExplain → -
alameda-prim
The alameda AMD loader that includes private promise shim
JavaScript ★ 3 7y agoExplain → -
browsertests
Standalone browser capability tests to help inform what is possible in a loader
PHP ★ 3 10y agoExplain → -
requirejs-nuget
Artifact used for pushing to NuGet
JavaScript ★ 2 6mo agoExplain → -
requirejs.github.io
requirejs.org site
HTML ★ 2 1y agoExplain → -
almond-nuget
NuGet setup for almond releases
JavaScript ★ 0 9y agoExplain →
No repos match these filters.