Skip to content

Commit e5e1284

Browse files
committed
docs: improve documentation
1 parent 9aaa62f commit e5e1284

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
## native-copyfiles
1010

11-
Copy files easily via JavaScript or the CLI, it uses [tinyglobby](https://www.npmjs.com/package/tinyglobby) internally for glob patterns and [yargs](https://www.npmjs.com/package/yargs) for the CLI.
11+
Copy files easily via JavaScript or the CLI, it uses [tinyglobby](https://www.npmjs.com/package/tinyglobby) internally for glob patterns and [cli-nano](https://www.npmjs.com/package/cli-nano) for the CLI.
1212

13-
The library is very similar from the outside to the [copyfiles](https://www.npmjs.com/package/copyfiles) package, however its internal is quite different, it uses more native NodeJS code and less dependencies (3 instead of 7). The package options are the same (except for `--soft` which is not implemented), some new options were also added in this project here (see below).
13+
The library is very similar to the [copyfiles](https://www.npmjs.com/package/copyfiles) package, at least from the outside, however its internal is quite different, it uses more native NodeJS code and a lot less dependencies (3 instead of 7). The options are nearly the same (except for `--soft` which is not implemented), new options were also added in this project here (mainly the rename feature, see below).
1414

15-
> Note: there is 1 noticeable difference with `copyfiles`, any options must be provided as a suffix after the source/target directories command (the original project had them as prefix).<br>
15+
> Note: there is 1 noticeable difference with `copyfiles`, any options must be provided as a suffix after the source/target directories command (the original `copyfiles` project has them as prefix).<br>
1616
> This mean calling: `copyfiles source target [options]` instead of `copyfiles [options] source target`
1717
1818
### Install
@@ -23,8 +23,12 @@ npm install native-copyfiles -D
2323

2424
### Command Line
2525

26-
```bash
27-
Usage: copyfiles inFile [more files ...] outDirectory [options]
26+
```
27+
Usage: copyfiles <inFile..> <outDirectory> [options]
28+
29+
Positionals:
30+
inFile Source file(s) [string|string[]]
31+
outDirectory Destination directory [string]
2832
2933
Options:
3034
-u, --up slice a path off the bottom of the paths [number]
@@ -41,7 +45,7 @@ npm install native-copyfiles -D
4145
```
4246

4347
> [!NOTE]
44-
> Options **must** be provided after the command directories as suffix (the original project had them as prefix)
48+
> Options **must** be provided after the command directories as suffix (the original project has them as prefix)
4549
4650
copy some files, give it a bunch of arguments, (which can include globs), the last one
4751
is the out directory (which it will create if necessary). Note: on Windows globs must be **double quoted**, everybody else can quote however they please.

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ try {
3232
positional: [
3333
{
3434
name: 'inFile',
35-
description: 'Source files',
35+
description: 'Source file(s)',
3636
type: 'string',
3737
variadic: true,
3838
required: true,

0 commit comments

Comments
 (0)