You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Strip the emoji meta-data for the data we need
This is done at build time by parsing emojione/emoji.json, stripping it and then writing to ./lib/stripped-emoji.json.
This commit is contained in:
17
scripts/emoji-data-strip.js
Normal file
17
scripts/emoji-data-strip.js
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env node
|
||||
const EMOJI_DATA = require('emojione/emoji.json');
|
||||
const fs = require('fs');
|
||||
|
||||
const output = Object.keys(EMOJI_DATA).map(
|
||||
(key) => {
|
||||
const datum = EMOJI_DATA[key];
|
||||
return {
|
||||
name: datum.name,
|
||||
shortname: datum.shortname,
|
||||
category: datum.category,
|
||||
emoji_order: datum.emoji_order,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
fs.writeFileSync('./lib/stripped-emoji.json', JSON.stringify(output));
|
Reference in New Issue
Block a user