diff --git a/currscript.js b/currscript.js index 73c0e9f..8a77833 100644 --- a/currscript.js +++ b/currscript.js @@ -185,6 +185,9 @@ function sortObjByKeys(obj) { // Generates the api files async function generateFiles(googBingCurrJSON) { const currenciesDir = path.join(rootDir, 'currencies') + fs.mkdirSync(currenciesDir, { + recursive: true + }) for (const [fromKey, fromValue] of Object.entries(googBingCurrJSON)) { const tempObj = {} tempObj['date'] = dateToday;