Skip to content

georgehenderson/require-dust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RequireJs plugin for Dust.js

Motivation

Tried dustjs-requirejs-plugin but could not get it to work with requirejs v2, also didn't like the fact that it puts the entire dust.js source code as part of the plugin. This plugin takes the advantage of AMD and loads dust.js as a module.

Features

  • works the same way as require-cs
  • pre-compile as part of requirejs optimization
  • exclude plugin logic once optimized (using requirejs "stubModules" feature in v2.0.0+)

Demo

Demo uses a modified version of Linkedin version of dust.js, but it should work with the akdubya version as well. Search in demo/dust-bull-0.6.0.js for "RDUST MOD" to see the modification.

cd demo
sh build.sh
node tools/app.js
// then open http://localhost:3000/demo (the AMD mode) and
// http://localhost:3000/demo-build (the optimized mode) to see the it in action

License

WTFPL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Shell 0.1%