Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrey Deryabin <deriabin@gmail.com>2014-12-17 11:04:20 +0300
committerAndrey Deryabin <deriabin@gmail.com>2014-12-17 11:04:20 +0300
commite4fe66b8d93313f23a50f6adf4bd37ffb19d5372 (patch)
tree6daf8da27422db61b24f51a24280fee6ef53b277 /lib
parentd3531a6fded02ba8ecd3e2d1f987927bd414883b (diff)
standalone sprockets support
Diffstat (limited to 'lib')
-rw-r--r--lib/bootstrap-sass.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/bootstrap-sass.rb b/lib/bootstrap-sass.rb
index 3d46477..dd7cc2d 100644
--- a/lib/bootstrap-sass.rb
+++ b/lib/bootstrap-sass.rb
@@ -4,7 +4,13 @@ module Bootstrap
# Inspired by Kaminari
def load!
register_compass_extension if compass?
- register_rails_engine if rails?
+
+ if rails?
+ register_rails_engine
+ elsif sprockets?
+ register_sprockets
+ end
+
configure_sass
end
@@ -30,7 +36,7 @@ module Bootstrap
end
# Environment detection helpers
- def asset_pipeline?
+ def sprockets?
defined?(::Sprockets)
end
@@ -66,6 +72,12 @@ module Bootstrap
def register_rails_engine
require 'bootstrap-sass/engine'
end
+
+ def register_sprockets
+ Sprockets.append_path(stylesheets_path)
+ Sprockets.append_path(fonts_path)
+ Sprockets.append_path(javascripts_path)
+ end
end
end