markr v0.0.4
markr
markr
recursively finds all the Jade templates in a directory and dumps them into a build folder.
Motivation
I found myself using a similar pattern to compile templates on all my projects, and I wanted a quicker way to get up and running while getting as many boilerplate dependencies as possible out of the individual project's package.json
. I like the idea of small, UNIX-like tools and am experimenting with how I might be able to create specific and simple utilities that can be easily combined together.
Usage
Step 0: Install
npm install -g markr
Step 1: Prepare Your Templates
markr
expects to receive a directory with Jade templates inside.
Step 2: Convert to Markup!
From the command line, run markr [<source> <destination>]
, where <source>
is the path to a directory containing Jade templates and <destination>
is the path to the directory in which you'd like the HTML generated. Paths can be absolute or relative.
Example: markr ui/templates build/html
Optional: Converting Single Files
If you give markr
a path to a file instead of a directory, it will just render that file into the given directory.