Skip to content

Commit

Permalink
Merge pull request #801 from aderyabin/sprockets_standalone
Browse files Browse the repository at this point in the history
standalone sprockets support
  • Loading branch information
glebm committed Dec 17, 2014
2 parents d3531a6 + e4fe66b commit 409ad55
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/bootstrap-sass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ class << self
# 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

Expand All @@ -30,7 +36,7 @@ def assets_path
end

# Environment detection helpers
def asset_pipeline?
def sprockets?
defined?(::Sprockets)
end

Expand Down Expand Up @@ -66,6 +72,12 @@ def register_compass_extension
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

Expand Down

0 comments on commit 409ad55

Please sign in to comment.