diff options
genStates - fix fs api calls
Diffstat (limited to 'development')
-rw-r--r-- | development/genStates.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/development/genStates.js b/development/genStates.js index 325ef71f3..d92e2bc2e 100644 --- a/development/genStates.js +++ b/development/genStates.js @@ -6,11 +6,11 @@ start().catch(console.error) async function start () { const statesPath = path.join(__dirname, 'states') - const stateFilesNames = await promisify(fs.readdirSync)(statesPath) + const stateFilesNames = await promisify(fs.readdir)(statesPath) const states = {} await Promise.all(stateFilesNames.map(async (stateFileName) => { const stateFilePath = path.join(__dirname, 'states', stateFileName) - const stateFileContent = await promisify(fs.readFileSync)(stateFilePath, 'utf8') + const stateFileContent = await promisify(fs.readFile)(stateFilePath, 'utf8') const state = JSON.parse(stateFileContent) const stateName = stateFileName.split('.')[0].replace(/-/g, ' ', 'g') states[stateName] = state |