diff --git a/README.md b/README.md index eae3e8a..494c0ec 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,20 @@ or global installation if you just want to use the cli tool: ## Usage -### CLI +### CLI "pdf-merge" ```txt +Usage: pdf-merge [options] + +merge multiple PDF documents, or parts of them, to a new PDF document + Options: -V, --version output the version number -o, --output Merged PDF output file path -v, --verbose Print verbose output -s, --silent do not print any output to stdout. Overwrites --verbose -h, --help display help for command + ``` #### Example calls diff --git a/cli.js b/cli.js old mode 100644 new mode 100755 index 042fb3c..6953b59 --- a/cli.js +++ b/cli.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -import fs from 'fs-extra' +import fs from 'fs' import { program } from 'commander' import PDFMerger from './index.js' @@ -63,6 +63,6 @@ function main (packageJson) { } (() => { - const packageJson = fs.readJsonSync(new URL('./package.json', import.meta.url)) + const packageJson = JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), 'utf-8')) main(packageJson) })()