I have an npm package that takes JSON file as input(argument).
I want to know How to pass input via CLI while running an npm package using npx?
I set up the command to run the package but I don’t know how to give input via CLI.
In my package.json file, I have these two commands.
It’s a script, it just runs the code then exits. If you just define a function without calling it then it won’t do anything, all you’ve done is written the definition of a function
Let say user want to convert the file from a HTML to pdf then I need to take the file as a input from the cli and inside our npm package we convert the file.
Should I take the file using file path(absolute or relative path)?