Add missing emoji

Generate GitHub emoji aliases from original source
This commit is contained in:
up9cloud 2019-02-21 07:05:06 +08:00 • committed by Anton Wilhelm
commit 6365a476e0
4 changed files with 27 additions and 891 deletions

20
build/emoji-aliases.js Normal file
View file

@ -0,0 +1,20 @@
const fs = require('fs')
const data = fs.readFileSync('/dev/stdin', 'utf-8')
const emoji = JSON.parse(data)
const AllGithubEmoji = []
for (let i = 0; i < emoji.length; i++) {
let o = emoji[i]
if (o.aliases) {
AllGithubEmoji.push(...o.aliases)
}
}
const str = `// DO NOT EDIT THIS FILE, IT'S GENERATED
// All from github official gemoji repo
// see https://github.com/github/gemoji/blob/master/db/emoji.json
export default ${JSON.stringify(AllGithubEmoji)}
`
fs.writeFileSync(__dirname + '/../src/plugins/emoji-aliases.js', str)