Ruby wrapper for the Pug/Jade template engine
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, )
Pug.compile(source, )
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
- Install both Pug and Jade
- Install gem dependencies:
bundle install
- Finally run tests:
bundle exec rake test