Create and compile templates from the command line.
# Rendering:
echo "Foo {{bar}} baz" | pixie --bar='BLAG'
# Foo BLAG baz
# Parsing:
echo "Hello {{world}}?" | pixie parse
# [["Hello ","?\n"],["world"]]
# Compiling (template above):
echo '[["Hello ","?\\n"],["world"]]' | pixie compile --world='Earth'
# Hello Earth?
CLI wrapper over pixie
, to easily create and compile templates from command line. You can also use a .pixierc
file, or any other methods the rc
module supports
$ npm install --global pixie-cli
Render the STDIN against the supplied data. Running pixie
aliases to this.
echo "Foo {{bar}} baz" | pixie --bar='12345'
# Foo 12345 baz
Parse the STDIN into a Pixie template.
echo "Foo {{bar}} baz" | pixie parse
# [["Foo "," baz\n"],["bar"]]
Compile the STDIN as a template, against data supplied through options or config.
cat template.json | pixie compile --bar='12345'
# Foo 12345 baz
MIT © Jamen Marz