0.1.2 • Published 8 years ago

pixie-cli v0.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

pixie-cli NPM version

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

Installation

$ npm install --global pixie-cli

API

pixie render

Render the STDIN against the supplied data. Running pixie aliases to this.

echo "Foo {{bar}} baz" | pixie --bar='12345'
# Foo 12345 baz

pixie parse

Parse the STDIN into a Pixie template.

echo "Foo {{bar}} baz" | pixie parse
# [["Foo "," baz\n"],["bar"]]

pixie compile

Compile the STDIN as a template, against data supplied through options or config.

cat template.json | pixie compile --bar='12345'
# Foo 12345 baz

License

MIT © Jamen Marz

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago