logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

update-emoji.js (677B)


  1. module.exports = {
  2. updateEmoji () {
  3. const emojis = require('@kazvmoe-infra/unicode-emoji-json/data-by-group')
  4. const fs = require('fs')
  5. Object.keys(emojis)
  6. .map(k => {
  7. emojis[k].map(e => {
  8. delete e.unicode_version
  9. delete e.emoji_version
  10. delete e.skin_tone_support_unicode_version
  11. })
  12. })
  13. const res = {}
  14. Object.keys(emojis)
  15. .map(k => {
  16. const groupId = k.replace('&', 'and').replace(/ /g, '-').toLowerCase()
  17. res[groupId] = emojis[k]
  18. })
  19. console.info('Updating emojis...')
  20. fs.writeFileSync('static/emoji.json', JSON.stringify(res))
  21. console.info('Done.')
  22. }
  23. }