dbc261a95a879133ad8bc51478223ab801069ec2
[yaffs-website] / vendor / twbs / bootstrap-sass / lib / bootstrap-sass / engine.rb
1 module Bootstrap
2   module Rails
3     class Engine < ::Rails::Engine
4       initializer 'bootstrap-sass.assets.precompile' do |app|
5         %w(stylesheets javascripts fonts images).each do |sub|
6           app.config.assets.paths << root.join('assets', sub).to_s
7         end
8
9         # sprockets-rails 3 tracks down the calls to `font_path` and `image_path`
10         # and automatically precompiles the referenced assets.
11         unless Sprockets::Rails::VERSION.split('.', 2)[0].to_i >= 3
12           app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)
13         end
14       end
15     end
16   end
17 end