Use ES5 export in data

nolan/hinaloe-test
Andrey Sitnik 2017-09-11 14:33:02 +10:00
parent dd35568567
commit 1c1c780e7b
1 changed files with 2 additions and 2 deletions

View File

@ -141,8 +141,8 @@ flags.emojis.sort()
mkdirp('data', (err) => {
if (err) throw err
const stringifiedData = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:')
fs.writeFile('data/index.js', `export default ${stringifiedData}`, (err) => {
const stringified = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:')
fs.writeFile('data/index.js', `module.exports = ${stringified}`, (err) => {
if (err) throw err
})
})