Permalink
Browse files

Adding stylesheets path to Sass.load_paths

Adding the stylesheets path to Sass' load_paths allows non Rails
apps to use the assets bundled with the gem directly, instead of
copying them manually into each projects, and manually updating
them.
  • Loading branch information...
ysbaddaden committed Dec 27, 2012
1 parent 47a78ff commit b7abce3b105aaae36fd6c3453f54e3308ecb7c90
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/bourbon.rb
View
@@ -4,6 +4,10 @@
require "bourbon/generator"
+unless defined?(Sass)
+ require 'sass'
+end
+
module Bourbon
if defined?(Rails) && defined?(Rails::Engine)
class Engine < ::Rails::Engine
@@ -17,9 +21,7 @@ class Railtie < ::Rails::Railtie
end
end
end
+ else
+ Sass.load_paths << File.expand_path("../../app/assets/stylesheets", __FILE__)
end
end
-
-unless defined?(Sass)
- require 'sass'
-end

1 comment on commit b7abce3

@hakanensari

This comment has been minimized.

Show comment Hide comment
@hakanensari

hakanensari Feb 22, 2013

@plapier I believe this makes the non-Rails installation directions in the README obsolete.

@plapier I believe this makes the non-Rails installation directions in the README obsolete.

Please sign in to comment.