Use ES5 export in data
parent
dd35568567
commit
1c1c780e7b
|
@ -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
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue