0.1.8 • Published 10 years ago

jr-jade v0.1.8

Weekly downloads
31
License
-
Repository
github
Last release
10 years ago

JR-JADE

A jr job for jade.

Example

var jrJade = require('jr-jade');

jrJade({
  inDir: 'src',
  outDir: 'out',
  options: {
    pretty: true
  }, 
  locals: {
    name: 'Jade'
  }
}, function (err) {
  if (err) {
    console.log(err);
  }
});

Given src/hello.jade:

doctype
html
  body
    p Hello, #{name}!

this writes out/hello.html:

<!DOCTYPE html>
<html>
  <body>
    <p>Hello, Jade!</p>
  </body>
</html>

Details

Jr-jade is a function that compiles jade files into html files. Although designed to be used with jr, it does not depend on jr and can be used by itself.

All *.jade files in 'inDir' (non-recursive) will be compiled to *.html files in 'outDir' with the same basename. Because 'inDir' is not traversed recursively, jade partials can be stored in subdirectories without generating their own html files.

See the jade public API for details on 'options' and 'locals'.

Jr-jade is a thin wrapper around the jade public API. Jade provides an API to compile jade strings, and a command-line tool to compile jade files, but no API to compile files. Jr-jade fills this gap.

0.1.8

10 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago