File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
lib/font/awesome/grunticon Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,25 @@ module Font
44 module Awesome
55 module Grunticon
66 module Rails
7- class Engine < ::Rails ::Engine ; end
7+ class Engine < ::Rails ::Engine
8+ initializer "font-awesome-grunticon-rails.assets.precompile" do |app |
9+ {
10+ 'javascripts' => '*.js' ,
11+ 'stylesheets' => '*.css' ,
12+ 'images' => '*.png' ,
13+ 'images/png' => '*.png'
14+ } . each do |dir , glob |
15+ fulldir = ::File . expand_path ( "../../../../../vendor/assets/#{ dir } " , __FILE__ )
16+ # puts "Checking #{fulldir} for #{glob}"
17+ ::Dir . glob ( "#{ fulldir } /#{ glob } " ) . map do |f |
18+ relative_path = f . sub ( "#{ fulldir } /" , '' )
19+ relative_path = "png/#{ relative_path } " if dir == 'images/png'
20+ # puts "Adding #{relative_path} to app.config.assets.precompile"
21+ app . config . assets . precompile += [ relative_path ]
22+ end
23+ end
24+ end
25+ end
826 end
927 end
1028 end
You can’t perform that action at this time.
0 commit comments