update emoji

This commit is contained in:
crimx 2019-08-15 01:42:57 +08:00
parent c95e611780
commit 73205070cf
2 changed files with 22 additions and 17 deletions

View file

@ -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`)
}
},
)