I want to create a script with node and node commander and when i try to grab the values of my args i get the value true instead the value itself.
For example if i write this in terminal:
node myfile.js -s somefile -d test
var program = require('commander');
program
.version('0.0.1')
.option('-s, --src', 'src csv file')
.option('-d, --destination', 'destination csv file')
.parse(process.argv);
console.log(program.src); // return true
console.log(program.destination); // return true
How i get the value of this args?
console.log(JSON.stringify(program));
Thanks. – Tonality