npx convert input.json -o output.yml
From the above command, I should access the arguments like this
and then pass these values to my npm package but the issue how to access these files path just by knowing a file name.
If I do this to access a file path
const inputFilename = process.argv
const outputFilename = process.argv
const inputpath = path.join(__dirname, inputFilename);
const outputpath = path.join(__dirname, outputFilename);
My doubt is how should I access inputpath and outputpath so that I can read it from my package using fs.
I am very new to this.
If there is any tutorial to understand this concept, please share with me
when I do
console.log(inputpath, outputpath), it returns this
postman-to-openapi-cli is my package folder name, it’s searching for the file in my package directory, but my file is located somewhere else.