Merge pull request #24 from danthompson/non_rails_support
Add non rails support
This commit is contained in:
@@ -15,7 +15,7 @@ gem 'gemoji'
|
||||
|
||||
**Sync images**
|
||||
|
||||
Images can be copied to your public directory with `rake emoji` in your Rails app. This is the recommended approach since the images will be available at a consistent location. This works best with cached formatted user content generated by tools like [html-pipeline](https://github.com/jch/html-pipeline).
|
||||
Images can be copied to your public directory with `rake emoji` in your app. This is the recommended approach since the images will be available at a consistent location. This works best with cached formatted user content generated by tools like [html-pipeline](https://github.com/jch/html-pipeline).
|
||||
|
||||
``` ruby
|
||||
# Rakefile
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
desc "Copy emoji to the Rails `public/images/emoji` directory"
|
||||
task :emoji => :environment do
|
||||
task :emoji do
|
||||
require 'emoji'
|
||||
|
||||
target = "#{Rails.root}/public/images/emoji"
|
||||
target = "#{Rake.original_dir}/public/images/emoji"
|
||||
|
||||
mkdir_p "#{target}"
|
||||
Dir["#{Emoji.images_path}/emoji/*.png"].each do |src|
|
||||
|
||||
Reference in New Issue
Block a user