Jade2Commonjs

We sometimes need to export Jade templates to JavaScript functions, but need them to be wrapped in CommonJS modules to be able to import them later. Compiling to JS functions is properly handled by Jade lib/CLI, but wrapping in modules isn't. This tool does it.

Installation

Install it via NPM/Github globally or in your project. You'll need the Jade/Pug runtime to get you modules working when you'll import them later. The runtime is installed for NPM < 2.x as peer dependency, which is not wiith NPM 3. If you use NPM 3, you need to install it manually.