Skip to content

Commit 12369bb

Browse files
committed
fix: fixed CLI to use modules
1 parent 08a31e9 commit 12369bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/fill.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env node
22
import { Form } from '../src/index.js';
3+
import yargs from 'yargs';
34

4-
const { argv } = require('yargs')
5+
const parser = yargs(process.argv.slice(2))
56
.command(
67
'* <source> [-m map] [-f filler] [-i input] [-o output]',
78
'Fill a PDF form.',
@@ -44,6 +45,7 @@ const { argv } = require('yargs')
4445
.help()
4546
.strict();
4647

48+
const { argv } = parser;
4749
const form = new Form();
4850

4951
form.init(argv.config)

0 commit comments

Comments
 (0)