Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c2f39c98
Commit
c2f39c98
authored
May 28, 2020
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new emoji map for future async loading
parent
9766ca6f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10776 additions
and
0 deletions
+10776
-0
lib/tasks/gemojione.rake
lib/tasks/gemojione.rake
+16
-0
public/-/emojis/1/emojis.json
public/-/emojis/1/emojis.json
+10760
-0
No files found.
lib/tasks/gemojione.rake
View file @
c2f39c98
...
...
@@ -32,6 +32,7 @@ namespace :gemojione do
dir
=
Gemojione
.
images_path
resultant_emoji_map
=
{}
resultant_emoji_map_new
=
{}
Gitlab
::
Emoji
.
emojis
.
each
do
|
name
,
emoji_hash
|
# Ignore aliases
...
...
@@ -53,6 +54,16 @@ namespace :gemojione do
}
resultant_emoji_map
[
name
]
=
entry
# Our new map is only characters to make the json substantially smaller
new_entry
=
{
c:
category
,
e:
emoji_hash
[
'moji'
],
d:
emoji_hash
[
'description'
],
u:
Gitlab
::
Emoji
.
emoji_unicode_version
(
name
)
}
resultant_emoji_map_new
[
name
]
=
new_entry
end
end
...
...
@@ -60,6 +71,11 @@ namespace :gemojione do
File
.
open
(
out
,
'w'
)
do
|
handle
|
handle
.
write
(
Gitlab
::
Json
.
pretty_generate
(
resultant_emoji_map
))
end
out_new
=
File
.
join
(
Rails
.
root
,
'public'
,
'-'
,
'emojis'
,
'1'
,
'emojis.json'
)
File
.
open
(
out_new
,
'w'
)
do
|
handle
|
handle
.
write
(
Gitlab
::
Json
.
pretty_generate
(
resultant_emoji_map_new
))
end
end
# This task will generate a standard and Retina sprite of all of the current
...
...
public/-/emojis/1/emojis.json
0 → 100644
View file @
c2f39c98
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment