1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-12 18:28:03 +01:00
Pinafore-Web-Client-Frontend/bin/build-assets.js
Nolan Lawson 1371175bce
feat: use emoji-picker-element, add emoji autocompletions/tooltips (#1804)
* 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 3cd2d94469.

* fix: fix emoji autosuggest

* test: fix test
2020-06-28 23:12:14 -07:00

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)
})