I have a node script which uses command line parameters using the module commander
.
I want to pack it with pkg
, but I am running into some trouble.
Normally I would execute my script with:
node index.js --file ./test.csv
but the file argument could point to any folder in the user's filesystem.
I have looked into configuring the assets
and scripts
attributes for pkg
in package.json
, but it looks like you need to specify a folder in there, such as:
"pkg": {
"scripts": "build/**/*.js",
"assets": "views/**/*"
}
How can I make a zeit-pkg packged node script aware of any possible location in the filesystem?
I am simply building with pkg package.json
, since in package.json
I have the entry:
"bin" : "index.js"