I am working on a typescript project and I have an npm script defined in my package.json file as follows:
"test:add": "cross-env some-static-var=value npm run some-command"
Now, I need to pass a variable value when I run this script from the command line interface (CLI). I just want to be able to pass a value, even if no specific variable name is provided in the CLI. Essentially, I would like to run the script like this:
npm run test:add --additionalValue
I am struggling to figure out how to pass and access this value from the CLI. I have tried various methods such as checking process.env, process.argv, and process.arg0 but none of them seem to contain the value "additionalValue." Can someone please help me with this issue?