feat!: require positional template; drop bare stdin and --template (#942)

* feat!: remove CLI support for template via STDIN

Fixes #940

Co-authored-by: Cursor <[email protected]>

* feat!: take CLI template as positional argument

Make template a required positional arg (drop --template) for v11 per #586; stdin template remains unsupported without a special error.

Co-authored-by: Cursor <[email protected]>

* fix: restore --template CLI option

Revert the positional-only template change. Keep --template as the primary API; stdin template remains unsupported without a special error.

Co-authored-by: Cursor <[email protected]>

* fix: restore explicit @- stdin for template and context

Keep @- for --template and --context; only the legacy bare-stdin-as-template fallback stays removed.

Co-authored-by: Cursor <[email protected]>

* feat: accept CLI template as positional or --template

Support positional <template> alongside --template/-t for compatibility; error if both are set and differ. Bare stdin template remains removed; @- still works.

Co-authored-by: Cursor <[email protected]>

* feat!: remove --template CLI option

Template is positional-only; bare stdin template and --template/-t are both removed. Keep @- for template and --context.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Yang Jun
2026-07-28 00:05:03 +08:00
committed by GitHub
co-authored by Cursor
parent 964a63b362
commit 1432380329
3 changed files with 19 additions and 64 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ npm install liquidjs
**CLI**
```bash
npx liquidjs --template 'Hello, {{ name }}!' --context '{"name": "Liquid"}'
npx liquidjs 'Hello, {{ name }}!' --context '{"name": "Liquid"}'
```
See the [setup guide][setup] for partials, layouts, caching, and other options.