Add example using context with CLI.

Brandon Pittman
2019-11-11 22:37:53 +09:00
parent 8106e329ea
commit 2ab8ed6d70
+6
@@ -30,6 +30,12 @@ Also available from CLI:
echo '{{"hello" | capitalize}}' | npx liquidjs
```
If you pass a path to a JSON file or a JSON string as the first argument, it will be used as the context for your template.
```bash
echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
```
## More Demos
There's [a live demo][jsfiddle] on JSFiddle, and a list of demo projects in [the demo/ directory][demo-dir]