Book Image

Web Development with Jade

By : Sean Lang
Book Image

Web Development with Jade

By: Sean Lang

Overview of this book

Table of Contents (16 chapters)

Passing arguments


Since compilers often take options, Jade has a syntax for passing options to filters. The syntax is the same as specifying attributes for tags, but with an exception.

For example, if we pass the minify option to the Stylus filter, the output is minified, rather than pretty-printed, as it was in the previous example:

:stylus(minify=true)
  p
    color red
  b
    font-weight bold
    color blue

  p{color:#f00}b{font-weight:bold;color:#00f}

For a full list of arguments that can be passed, see the transformers repository at https://github.com/ForbesLindesay/transformers.