1371175bce
* feat: use emoji-picker-element, add emoji autocompletions/tooltips * fix: fix lint bug * test: fix emoji in chrome on linux in travis * test: try bionic in travis * chore: try to fix travis * chore: try to fix travis * fix: filter unsupported emoji * chore: try to fix travis * chore: try to fix travis * chore: try to fix travis * chore: try to fix travis * Revert "chore: try to fix travis" This reverts commit 3cd2d94469b2f1a20c847c2a69e088d7c8d1efdd. * fix: fix emoji autosuggest * test: fix test
26 lines
601 B
JavaScript
26 lines
601 B
JavaScript
import path from 'path'
|
|
import fs from 'fs'
|
|
import { promisify } from 'util'
|
|
import trimEmojiData from 'emoji-picker-element/trimEmojiData.cjs'
|
|
|
|
const readFile = promisify(fs.readFile)
|
|
const writeFile = promisify(fs.writeFile)
|
|
|
|
async function main () {
|
|
let json = JSON.parse(await readFile(
|
|
path.resolve(__dirname, '../node_modules/emojibase-data/en/data.json'),
|
|
'utf8')
|
|
)
|
|
json = trimEmojiData(json)
|
|
await writeFile(
|
|
path.resolve(__dirname, '../static/emoji-all-en.json'),
|
|
JSON.stringify(json),
|
|
'utf8'
|
|
)
|
|
}
|
|
|
|
main().catch(err => {
|
|
console.error(err)
|
|
process.exit(1)
|
|
})
|