RequireJS allows you to write loader plugins that can load different types of resources as dependencies, and even include the dependencies in optimized builds. Some plugins may also work with other AMD loaders like [curl](https://github.com/unscriptable/curl) and [backdraft](http://bdframework.org/bdLoad/docs/bdLoad-tutorial/bdLoad-tutorial.html), compatibility isn't ensured though, some plugins may require access to RequireJS internal methods to work. For info about how to use and/or write plugins, [check the documentation](http://requirejs.org/docs/plugins.html). # List of plugins curated by the community - [Official Plugins](#official) - [File Type](#file_type) - [Templating](#templating) - [Unit Testing](#unit_test) - [Script Helpers](#script) - [Miscellaneous](#misc) ## Official Plugins - [domReady](http://requirejs.org/docs/api.html#pageload) by James Burke - Waits for the DOM to be ready for modifications. Includes domReady.withResources(), which is RequireJS-specific. However the basic domReady plugin should be usable in other AMD loaders. - [i18n](http://requirejs.org/docs/api.html#i18n) by James Burke - Localization plugin. Loads dependencies based on the locale. - [text](http://requirejs.org/docs/api.html#text) by James Burke - Loads dependencies as plain text files. - [step](https://github.com/requirejs/step) by James Burke - Loads scripts in steps. Only works with AMD loaders that support [module config](http://requirejs.org/docs/api.html#config-moduleconfig), like RequireJS 2.0. Prefer the RequireJS 2.0 [shim config](http://requirejs.org/docs/api.html#config-shim) over this when possible. - [order](http://requirejs.org/docs/api.html#order) by James Burke - Evaluate scripts in sequence. Useful for non-AMD modules which should be loaded in sequence. Only works with RequireJS, not other AMD loaders. **Only works in RequireJS 1.0, not in RequireJS 2.0**. Use [shim config](http://requirejs.org/docs/api.html#config-shim) or the step plugin instead. ## File Type - [cs](https://github.com/jrburke/require-cs) by James Burke - Load CoffeeScript files and also compiles modules into JavaScript during optimization. - [amd-loader](https://github.com/guybedford/amd-loader) by Guy Bedford - A base plugin helper to easily make template and compiler plugins. - [ES6 (Traceur)](https://github.com/guybedford/es6) by Guy Bedford - Dynamically load and build ES6 modules using Traceur. - [ES6 (Babel)](https://github.com/mikach/requirejs-babel) by Mikach - Dynamically load and build ES6 modules using Babel. - [CJS](https://github.com/guybedford/cjs) by Guy Bedford - Load CommonJS modules from RequireJS dynamically supporting cross origin and builds. - [CJS2](https://github.com/ghybs/cjs2) by ghybs - Like CJS but recursively loads sub-dependencies through CJS2, unless specified otherwise in the require configuration. - [font](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Loads web fonts using the [WebFont Loader API](https://code.google.com/apis/webfonts/docs/webfont_loader.html). - [html](https://github.com/DejaMi/requirejs-html) by DejaMi - Loads HTML files and partials. - [image](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Loads image files. - [json](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Loads JSON files and parses it. Converts it into JS during optimization. - [mdown](https://github.com/millermedeiros/requirejs-plugins/) by Miller Medeiros - Loads Markdown files and compiles into HTML, will also work during optimization. - [require-css](https://github.com/guybedford/require-css) by Guy Bedford - Fully compatible CSS requiring and build optimization. - [require-less](https://github.com/guybedford/require-less) by Guy Bedford - Extends require-css, allowing for LESS injection and builds. - [requirejs-link](https://github.com/gartz/requirejs-link) by Gabriel Reitz Giannattasio - Create link element, detecting it file extension (css or html), append it to DOM and return the - [export](https://github.com/DrSammyD/export) by Sam Armstrong - Loads text files and parses it based on comments. Converts it into JS during optimization.element. (It's a fork of the text plugin). - [require-yaml](https://github.com/m90/require-yaml) by Frederik Ring - Loads YAML files and compiles them into plain JavaScript objects using [js-yaml](https://github.com/nodeca/js-yaml), will also work during optimization. ## Templating - [jade](https://github.com/rocketlabsdev/require-jade) by Dan Williams - For [jade](http://jade-lang.com/) templates. - [handlebars](https://github.com/SlexAxton/require-handlebars-plugin) and [sc-handlebars](https://github.com/SlexAxton/sc-handlebars) by Alex Sexton - For (Sproutcore) Handlebars Templates - [micro-templates](https://github.com/ZeeAgency/requirejs-tpl) by Julien Cabanès - Uses [underscorejs](http://documentcloud.github.com/underscore/#template) micro-templates implementation. - [micro-templates](https://github.com/eeroan/requirejs-tpl) Updated fork by Eero Anttila. This version works with latest r.js and with both Node and Rhino. The implementation is based on latest text plugin and latest _.template - [mustache / hogan](https://github.com/millermedeiros/requirejs-hogan-plugin) by Miller Medeiros - For mustache templates, compiles templates during build. - [mustache](https://github.com/daytona/requirejs-mustache-loader) by Carl Törnqvist - Load Mustache templates dynamically, compile during build and *automatically resolve partials* - [speck] (https://github.com/wshaver/speck) by Will Shaver - For using [linkedin dustjs] (https://github.com/linkedin/dustjs) templates in [Backbone] (https://github.com/documentcloud/backbone/) views. - [underscore](https://github.com/dciccale/requirejs-underscore-tpl) by Denis Ciccale - For [underscore](http://underscorejs.org/#template) templates. - [Lo-Dash Template Loader](https://github.com/tbranyen/lodash-template-loader) by Tim Branyen - For [Lo-Dash](http://lodash.com/docs#template) or [underscore](http://underscorejs.org/#template) templates. Always serves the compiled function, default extension and root, configurable tempateSettings, and works in R.js, Dojo, and Curl.js loaders. - [html](https://github.com/gartz/html) by Gabriel Reitz Giannattasio - For native HTML parsers (useful with Web Components and AngularJS) - [rvc](https://github.com/ractivejs/rvc) by Rich Harris and Martin Kolárik - For [Ractive.js](http://ractivejs.org) templates - [kendo-template](https://github.com/rally25rs/require-kendo-template) by Jeff Valore - For loading Telerik [Kendo UI](http://www.telerik.com/kendo-ui) templates into script elements in the DOM. ## Localization/Internationalization - [l20n](https://github.com/fernandogmar/L20n-RequireJS) by Fernando Gómez - Localization with l20n. ## Unit Testing - [factory](https://github.com/tigbro/requirejs-factory-plugin) by Tobias Bosch **(Obsolete: Overcome by another project)** - Allow calling the module factory function multiple times passing different mock objects. *** ## Script Helpers - [async](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Load asynchronous scripts (e.g. Google Maps) and also for JSONP. - [depend](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Load JS files that have dependencies but aren't wrapped into define calls. - [fingerprint](https://github.com/meinaart/requirejs-fingerprint) by Meinaart van Straalen - Add a fingerprint when loading a resource via RequireJS while maintaining original module name. Fingerprint can be configured via config. - [goog](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Load [Google APIs](http://code.google.com/apis/loader/) asynchronously. - [noext](https://github.com/millermedeiros/requirejs-plugins) by Miller Medeiros - Load scripts without appending the ".js" extension, useful for dynamic scripts. - [use](http://tbranyen.com/post/amdrequirejs-shim-plugin-for-loading-incompatible-javascript) by Tim Branyen - Load JS files that aren't wrapped into define calls with the option to set dependencies and the value that should be used by the module. - [wrap](https://github.com/geddski/wrapjs) by Dave Geddes - Wrap regular scripts as AMD modules. - [cache](https://github.com/jensarps/AMD-cache) by Jens Arps - Store modules in localStorage - [feature](https://github.com/jensarps/AMD-feature) by Jens Arps - Load different implementations of same functionality by providing an implementation map or feature tests the HTML page is still streaming. - [replace](https://github.com/SBoudrias/require.replace) by Simon Boudrias - Modify script paths based on a pattern and value specified. (Useful for third-party i18n sdk) - [registry](https://github.com/dmkuznetsov/requirejs-registry) by Dmitry Kuznetsov - Wrap for requirejs.config(). Extended work with config. - [shim](https://github.com/brettz9/shim/) by Brett Zamir - Conditional shim loading, avoiding additional document loads when the feature is already detected as supported - [priv](https://github.com/brettz9/asyouwish/tree/master/requirejsPrivPlugin) by Brett Zamir - Experimental wrapper for [AsYouWish Firefox add-on](https://github.com/brettz9/asyouwish/) API allowing privileged access to Firefox's internal Addon SDK (also using require() in its own [API](https://addons.mozilla.org/en-US/developers/docs/sdk/latest/)) from regular client-side HTML - [namespace](https://github.com/atesgoral/requirejs-namespace-plugin) by Ates Goral - Boilerplate-free creation of nested namespaces. - [rq](https://github.com/asengupta/requirejs-q) by Avishek Sen Gupta - A RequireJS plugin to transparently load modules which return Q promises. - [promise](https://github.com/jokeyrhyme/requirejs-promise) by Ron Waldon - This is a plugin for Require.JS that allows modules to resolve asynchronously via jQuery Promises. - [promiseme](https://github.com/andreineculau/requirejs-promiseme) by Andrei Neculau - Load async modules that return Promises. - [loader](https://github.com/uhray/requirejs-loader-plugin) by Robert Thompson - Load multiple modules into an one object. ## Miscellaneous - [locate](https://github.com/atesgoral/requirejs-locate-plugin) by Ates Goral - An experimental Service Locator implementation that doesn't require consumer modules to know about a global Service Registry. - [proc](https://github.com/gamtiq/amd-proc-plugin) by Denis Sikuler - Loads resource file using specified plugin, applies some procedure/transformation to resource's content and returns result of transformation. - [view](https://github.com/gamtiq/amd-view-plugin) by Denis Sikuler - Loads text/html file using `text!` plugin, parses and processes dependency directives in the file content, removes/replaces them in the content and loads the specified dependencies before returning result. The "refined" file content will be returned as resource value. - [stub](https://github.com/atesgoral/requirejs-stub) by Ates Goral - Stub loader plugin to completely disable a loader plugin during optimization. - [bower](https://github.com/RodneyEbanks/requirejs-plugin-bower) by Rodney Ebanks - Plugin for creating & loading Path/Shim configurations automatically from bower.json dependencies. - [config](https://github.com/RodneyEbanks/requirejs-plugin-config) by Rodney Ebanks - Plugin for obtaining the requirejs.config object. - [rq-dir](https://github.com/dbartholomae/node-rq-dir) by Daniel Bartholomae - Plugin for rescursively requiring files from a directory when using RequireJS in Node.js - [lodash-requirejs-loader-plugin](https://github.com/mokkabonna/lodash-requirejs-loader-plugin) by Martin Hansen - Load lodash AMD with **_!map,reduce,flatten** syntax. Avoids build bloat. Optimized loading during development.