Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone sprockets support #801

Merged
merged 1 commit into from
Dec 17, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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