From 7e2faa22e450e07acabee4c47ff9e072c193ab4a Mon Sep 17 00:00:00 2001 From: Mathias Meyer Date: Mon, 23 Sep 2013 17:39:26 +0200 Subject: [PATCH] Add rake task to update emoij.coffee. --- Rakefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rakefile b/Rakefile index ae388e82..e7afa057 100644 --- a/Rakefile +++ b/Rakefile @@ -28,3 +28,9 @@ namespace :ember do system 'cp tmp/ember.js/dist/ember.js assets/javascripts/vendor/ember.js' end end + +task :update_emojis do + s = Dir.glob('assets/images/emoji/*.png').map {|png| png.split('/', 4)[3].gsub('.png', '')}.map{|png| "'#{png}'"}.join(", ") + e = "@EmojiDictionary = [#{s}]" + File.open("assets/scripts/config/emoij.coffee", "w") {|f| f.write(e) } +end