Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including dustjs-loader with all npm packages installed. Try it out:

var dustjsLoader = require("dustjs-loader")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

dustjs-loader v1.1.0

Require and automatically compile dustjs (.dust) files.

NPM version


Module to automatically compile and cache dustjs (.dust) files.


This package is available on npm as:

npm install dustjs-loader


Example using a callback:

  path: 'lib/templates'

var template = require('./template.dust');

template({ foo : 42 }, function (error, html) {
  if (error) { ... }

Example using a promise:

   path    : 'lib/templates',
   promise : true

var template = require('./template.dust');

template({ foo : 42 })
  .then(function (html) {
  .catch(function (error) {

Dust templates in the browser

The dustjs-browserify module makes it easy to use dust templates in the browser.

Dustjs documentation




RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free