Skip to content

Commit

Permalink
Merge pull request #75 from adilsoncarvalho/bootstrap-support
Browse files Browse the repository at this point in the history
Added support for bootstrap-sass
  • Loading branch information
ixti committed Feb 21, 2014
2 parents e4035ff + 4638234 commit 3d03ac0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -301,6 +301,18 @@ Now you can add `@import "compass"` in your SASS assets to get Compass goodies.
you must require them BEFORE `jekyll-assets/compass`.


#### Bootstrap Support

Require `jekyll-assets/bootstrap` to enable, e.g.:

``` ruby
require "jekyll-assets"
require "jekyll-assets/bootstrap"
```

Now you can add `@import "bootstrap"` in your SASS assets to get Bootstrap goodies.


#### Bourbon Support

Require `jekyll-assets/bourbon` to enable, e.g.:
Expand Down
1 change: 1 addition & 0 deletions jekyll-assets.gemspec
Expand Up @@ -33,4 +33,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "compass"
spec.add_development_dependency "bourbon"
spec.add_development_dependency "neat"
spec.add_development_dependency "bootstrap-sass"
end
7 changes: 7 additions & 0 deletions lib/jekyll-assets/bootstrap.rb
@@ -0,0 +1,7 @@
require "sprockets"


bootstrap = Gem::Specification.find_by_name("bootstrap-sass").gem_dir
%w(fonts javascripts stylesheets).each do |asset|
Sprockets.append_path File.join(bootstrap, 'vendor', 'assets', asset)
end
10 changes: 10 additions & 0 deletions spec/lib/jekyll-assets/bootstrap_spec.rb
@@ -0,0 +1,10 @@
require "spec_helper"
require "jekyll-assets/bootstrap"

module Jekyll::AssetsPlugin
describe "Bootstrap integration" do
it "should globally append bootstrap paths into Sprockets environment" do
@site.assets["bootstrap.css"].to_s.should =~ /bootstrap\//
end
end
end

0 comments on commit 3d03ac0

Please sign in to comment.