From 1a8f42e94f363241c1535fe7540d74d42413e10b Mon Sep 17 00:00:00 2001 From: Fawaz Ahmed Date: Thu, 29 Feb 2024 21:11:14 +0530 Subject: [PATCH] create rootdir if doesn't exists --- currscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currscript.js b/currscript.js index 213d944..c460d1b 100644 --- a/currscript.js +++ b/currscript.js @@ -61,7 +61,7 @@ async function begin() { const currJSON = await getCurrencies() // Get & Save All the available currencies in api const availCurrListObj = await getAvailCurrencyJSON(currJSON) - fs.writeFileSync(path.join(rootDir, 'currencies.min.json'), JSON.stringify(availCurrListObj)) + fs.outputFileSync(path.join(rootDir, 'currencies.min.json'), JSON.stringify(availCurrListObj)) fs.writeFileSync(path.join(rootDir, 'currencies.json'), JSON.stringify(availCurrListObj, null, indent)) // Generate API files