build_emoji: Generate emoji names and codepoints from emoji_map.

Replaces the hardcoded list of emoji_names and unicode_emoji_names in
static/js/emoji.js with a list generated from emoji_map.json, both to get
the list out of version control and so we can start modifying it for our
autocomplete. This does not change the contents of emoji_names. It sorts and
removes duplicates from unicode_emoji_names (causes no change in behavior,
since unicode_emoji_names is only used as if it were a set).
This commit is contained in:
Rishi Gupta
2017-01-25 15:41:53 -08:00
committed by Tim Abbott
parent 762b84710e
commit 6b3abce541
7 changed files with 32 additions and 9 deletions

View File

@@ -30,6 +30,7 @@ set_global('page_params', {
add_dependencies({
marked: 'third/marked/lib/marked.js',
emoji_codes: 'generated/emoji/emoji_codes.js',
emoji: 'js/emoji.js',
people: 'js/people.js',
stream_data: 'js/stream_data.js',

View File

@@ -6,6 +6,7 @@ set_global('page_params', {realm_emoji: {
add_dependencies({
Handlebars: 'handlebars',
templates: 'js/templates',
emoji_codes: 'generated/emoji/emoji_codes.js',
emoji: 'js/emoji',
i18n: 'i18next',
});