13/04
2016
dev-master
9999999-devCLI for the Twig template engine
MIT
The Requires
CLI for the Twig template engine
$ wget https://github.com/xrash/twig-cli/raw/master/bin/twig.phar -O /tmp/twig.phar $ chmod +x /tmp/twig.phar $ sudo mv /tmp/twig.phar /usr/local/bin/twig
One liner:, (*1)
$ wget https://github.com/xrash/twig-cli/raw/master/bin/twig.phar -O /tmp/twig.phar && chmod +x /tmp/twig.phar && sudo mv /tmp/twig.phar /usr/local/bin/twig
Passing files as arguments:, (*2)
$ twig file1.html.twig file2.html.twig > result.html
Processing the input through STDIN:, (*3)
$ cat file.html.twig | twig > result.html
Using inline parameters:, (*4)
$ cat file.html.twig | twig -p title="My Title" -p env=dev > result.html
CLI for the Twig template engine
MIT