Skip to content

Commit 064383a

Browse files
committed
fix: do not use fs-extra in cli
1 parent a329970 commit 064383a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@ or global installation if you just want to use the cli tool:
1919

2020
## Usage
2121

22-
### CLI
22+
### CLI "pdf-merge"
2323

2424
```txt
25+
Usage: pdf-merge [options] <inputFiles...>
26+
27+
merge multiple PDF documents, or parts of them, to a new PDF document
28+
2529
Options:
2630
-V, --version output the version number
2731
-o, --output <outputFile> Merged PDF output file path
2832
-v, --verbose Print verbose output
2933
-s, --silent do not print any output to stdout. Overwrites --verbose
3034
-h, --help display help for command
35+
3136
```
3237

3338
#### Example calls

cli.js

100644100755
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import fs from 'fs-extra'
3+
import fs from 'fs'
44
import { program } from 'commander'
55

66
import PDFMerger from './index.js'
@@ -63,6 +63,6 @@ function main (packageJson) {
6363
}
6464

6565
(() => {
66-
const packageJson = fs.readJsonSync(new URL('./package.json', import.meta.url))
66+
const packageJson = JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), 'utf-8'))
6767
main(packageJson)
6868
})()

0 commit comments

Comments
 (0)