Skip to content

Commit 400ae4c

Browse files
authored
docs: use wildcard (*) to represent renaming from CLI
1 parent fb17fdc commit 400ae4c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If the destination path is a directory, the file will be copied into that direct
127127
128128
### Rename Multiple Files During Copy
129129
130-
#### 1. Rename Using Glob Patterns
130+
#### 1. Rename Using Wildcard (`*`)
131131
132132
You can use a wildcard (`*`) in the destination to rename files dynamically. For example, to copy all `.css` files and change their extension to `.scss`:
133133
@@ -146,7 +146,7 @@ You can combine this with `--flat` or `--up` to control the output structure.
146146
#### 2. Rename Using a Callback (JavaScript API)
147147
148148
For advanced renaming, you can use the `rename` callback option in the API.
149-
This function receives the source and destination path and should return the new destination path.
149+
This function receives the source and destination path and should return the new destination path of each file being processed.
150150
151151
**Example: Change extension to `.scss` using a callback**
152152
@@ -176,10 +176,10 @@ copyfiles(['input/**/*.css', 'output'], {
176176
The `rename` callback gives you full control over the output filename and path.
177177
178178
> **Tip:**
179-
> You can use either the glob pattern approach or the `rename` callback, or even combine them for advanced scenarios!
179+
> You can use either the wildcard approach or the `rename` callback, or even combine them for advanced scenarios!
180180
181181
> [!NOTE]
182-
> If you use both a destination glob pattern (e.g. `output/*.ext`) and a `rename` callback, the glob pattern is applied first and then the `rename` callback is executed last on the computed destination path. This allows you to combine both features for advanced renaming scenarios.
182+
> If you use both a destination wildcard approach (e.g. `output/*.ext`) and a `rename` callback, the wildcard change is applied first and then the `rename` callback is executed last on the computed destination path. This allows you to combine both features for advanced renaming scenarios.
183183
184184
---
185185

0 commit comments

Comments
 (0)