reverse accepts new file paths via globs
All checks were successful
Publish npm package / publish (push) Successful in 22s
All checks were successful
Publish npm package / publish (push) Successful in 22s
This commit is contained in:
15
README.md
15
README.md
@@ -208,6 +208,21 @@ tdir reverse ./output ./templates --map meta/reverse-map.json
|
||||
bunx @gregorlohaus/tdir reverse ./output ./templates --map meta/reverse-map.json
|
||||
```
|
||||
|
||||
New files created in the rendered directory are ignored by default. Include them explicitly with one or more glob patterns:
|
||||
|
||||
```sh
|
||||
tdir reverse ./output ./templates --include "components/**"
|
||||
tdir reverse ./output ./templates --include "components/**/*.ts" --include "pages/*.html"
|
||||
```
|
||||
|
||||
Programmatically, pass the same globs to `reverseDir`:
|
||||
|
||||
```ts
|
||||
reverseDir("./output", "./templates", {
|
||||
include: ["components/**/*.ts", "pages/*.html"]
|
||||
})
|
||||
```
|
||||
|
||||
The command writes files at their original template paths, restores recorded `<@var(...)>` tokens, wraps edited inline conditional output back in the original conditional block, and restores template files that were skipped by path conditionals.
|
||||
|
||||
## Unmatched directives
|
||||
|
||||
Reference in New Issue
Block a user