Ruby wrapper for the Pug/Jade template engine

Gem Version Build Status

About

This gem is wrapper for Pug/Jade command line interface. You can compile both Jade templates (version 1.x) and Pug (version 2.x).

Jade.compile(source, options)
Pug.compile(source, options)

Installing gem

Run gem install pug-ruby -v '~> 1.0'. Add require 'pug-ruby' to your code.

If you are using bundler.
Add to your Gemfile:

gem 'pug-ruby', '~> 1.0'

Installing Jade

Install Jade globally via npm:

npm install --global jade

Installing Pug

Install Pug globally via npm:

npm install --global pug-cli

Configuring Pug and Jade

Access Pug and Jade configurations:

Jade.config.compile_debug = false
Pug.config.compile_debug  = false

Refer to official website for configuration options meaning:
pugjs.org
jade-lang.com (sorry, webarchive only)

Running Tests

  1. Install both Pug and Jade
  2. Install gem dependencies: bundle install
  3. Finally run tests: bundle exec rake test