Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Add jade to requireJS
branch: master
Failed to load latest commit information.
demo-build fix for inlining jade runtime
demo implement suggestions from @jrburke
tools implement suggestions from @jrburke
LICENSE First shot implement suggestions from @jrburke


A Jade loader plugin for RequireJS.

It is known to work with RequireJS 0.26.0+.

In development, it uses XMLHttpRequest to fetch the .jade files, so you can only fetch files that are on the same domain as the HTML page, and most browsers place restrictions on using XMLHttpRequest from local file URLs, so use a web server to serve your .jade files.


Reference Jade files via the jade! plugin name:

require(['jade!userview'], function (userView) {

They will be returned as a Jade template function that accepts locals as the first arg.


When you are ready to deploy your application and want to compile your JS into a single file you can make used of the requireJS optimizer. Jade.js includes optimizer instructions that will precompile the templates and remove the Jade compiler from the compiled source. Only do this if you are not going to be dynamically including more Jade templates.

To use the activate the instructions just include:

pragmasOnSave: {
  excludeJade : true


Available via the MIT or new BSD license.

The Jade parts are governed by the Jade license.

Something went wrong with that request. Please try again.