update emoji
This commit is contained in:
parent
c95e611780
commit
73205070cf
2 changed files with 22 additions and 17 deletions
|
@ -30,18 +30,16 @@ request({
|
|||
return emojis
|
||||
}, {})
|
||||
|
||||
const emojis = _.assign({}, require('./emojis.json'), latestEmojis)
|
||||
|
||||
// update local backup
|
||||
fs.writeFile(
|
||||
path.join(__dirname, 'emojis.json'),
|
||||
JSON.stringify(emojis, null, ' '),
|
||||
JSON.stringify(latestEmojis, null, ' '),
|
||||
function (err) {
|
||||
if (err) {
|
||||
console.warn(err)
|
||||
process.exit(1)
|
||||
} else {
|
||||
console.log(`Update ${Object.keys(emojis).length} emojis`)
|
||||
console.log(`Update ${Object.keys(latestEmojis).length} emojis`)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue