Skip to content

Commit

Permalink
Changed import-svg-to-src-folder.js to not rely on openmoji.json to a…
Browse files Browse the repository at this point in the history
…llow import of missing emojis

Co-Authored-By: Liz Bravo <[email protected]>
  • Loading branch information
b-g and lizbravob committed Jul 21, 2020
1 parent 19f78b4 commit e7365e2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion helpers/import-svg-to-src-folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ const glob = require('glob').sync;
var argv = process.argv.slice(2);
const _ = require('lodash');

const emojis = require('../data/openmoji.json');
const emojibaseData = require('emojibase-data/en/data.json');
const emojibaseGroups = require('emojibase-data/meta/groups.json');
const groups = emojibaseGroups.groups;
const subgroups = emojibaseGroups.subgroups;

const emojis = _.map(emojibaseData, e => {
e.group = groups[e.group];
e.subgroups = subgroups[e.subgroup];
return e
});

if(!argv[0]) {
help();
Expand Down

0 comments on commit e7365e2

Please sign in to comment.