Version 1
[yaffs-website] / vendor / twbs / bootstrap-sass / lib / bootstrap-sass / engine.rb
diff --git a/vendor/twbs/bootstrap-sass/lib/bootstrap-sass/engine.rb b/vendor/twbs/bootstrap-sass/lib/bootstrap-sass/engine.rb
new file mode 100644 (file)
index 0000000..dbc261a
--- /dev/null
@@ -0,0 +1,17 @@
+module Bootstrap
+  module Rails
+    class Engine < ::Rails::Engine
+      initializer 'bootstrap-sass.assets.precompile' do |app|
+        %w(stylesheets javascripts fonts images).each do |sub|
+          app.config.assets.paths << root.join('assets', sub).to_s
+        end
+
+        # sprockets-rails 3 tracks down the calls to `font_path` and `image_path`
+        # and automatically precompiles the referenced assets.
+        unless Sprockets::Rails::VERSION.split('.', 2)[0].to_i >= 3
+          app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)
+        end
+      end
+    end
+  end
+end