feat!: remove CLI support for template via STDIN

Fixes #940

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Yang Jun
2026-07-24 01:54:17 +08:00
co-authored by Cursor
parent 964a63b362
commit 44712f64fc
2 changed files with 5 additions and 54 deletions
+1 -9
View File
@@ -65,13 +65,7 @@ You can either pass the template inline (as shown above) or you can read it from
npx liquidjs --template @./some-template.liquid
```
You can also use the `@-` syntax to read the template from `stdin`:
```bash
echo '{{"hello" | capitalize}}' | npx liquidjs --template @-
```
A context can be passed in the same ways (i.e. inline, from a path or piped through `stdin`). The following three are equivalent:
A context can be passed inline, from a path, or piped through `stdin`. The following three are equivalent:
```bash
npx liquidjs --template 'Hello, {{ name }}!' --context '{"name": "Snake"}'
@@ -79,8 +73,6 @@ npx liquidjs --template 'Hello, {{ name }}!' --context @./some-context.json
echo '{"name": "Snake"}' | npx liquidjs --template 'Hello, {{ name }}!' --context @-
```
Note that you can only use the `stdin` specifier `@-` for a single argument. If you try to use it for both `--template` and `--context` you will get an error.
The rendered output is written to `stdout` by default, but you can also specify an output file (if the file exists, it will be overwritten):
```bash