This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load depending on environment, to work with Compass or Rails.
- Loading branch information
1 parent
5ca21d1
commit af99dec
Showing
8 changed files
with
85 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in bootswatch-rails.gemspec | ||
# Specify your gem's dependencies in bootswatch-sass.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'bootswatch-sass/version' | ||
|
||
Gem::Specification.new do |gem| | ||
gem.name = "bootswatch-sass" | ||
gem.version = Bootswatch::VERSION | ||
gem.authors = ["Maxim Chernyak","Esteban Arango Medina"] | ||
gem.email = ["[email protected]","[email protected]"] | ||
gem.description = %q{Bootswatches converted to SCSS ready to use in Compass or Rails projects.} | ||
gem.summary = %q{Bootswatches in Compass or Rails projects} | ||
gem.homepage = "http://github.com/anthonycreates/bootswatch-sass" | ||
|
||
gem.add_dependency 'bootstrap-sass' | ||
gem.add_dependency 'activesupport', '~> 3.2.0' | ||
gem.add_dependency 'rake', '>= 0.8.7' | ||
|
||
gem.files = `git ls-files`.split($\) | ||
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } | ||
gem.require_paths = ["lib"] | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
module Bootswatch | ||
class << self | ||
# Inspired by Bootstrap Sass | ||
def load! | ||
register_rails_engine if rails? | ||
configure_sass | ||
end | ||
|
||
# Paths | ||
def gem_path | ||
@gem_path ||= File.expand_path '..', File.dirname(__FILE__) | ||
end | ||
|
||
def stylesheets_path | ||
File.join assets_path, 'stylesheets' | ||
end | ||
|
||
def fonts_path | ||
File.join assets_path, 'fonts' | ||
end | ||
|
||
def javascripts_path | ||
File.join assets_path, 'javascripts' | ||
end | ||
|
||
def assets_path | ||
@assets_path ||= File.join gem_path, 'vendor', 'assets' | ||
end | ||
|
||
# Environment detection helpers | ||
def asset_pipeline? | ||
defined?(::Sprockets) | ||
end | ||
|
||
def compass? | ||
defined?(::Compass) | ||
end | ||
|
||
def rails? | ||
defined?(::Rails) | ||
end | ||
|
||
private | ||
|
||
def configure_sass | ||
require 'sass' | ||
|
||
::Sass.load_paths << stylesheets_path | ||
end | ||
|
||
def register_rails_engine | ||
require 'bootswatch-sass/engine' | ||
end | ||
end | ||
end | ||
|
||
Bootswatch.load! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require 'bootswatch-rails/version' | ||
|
||
module Bootswatch | ||
module Rails | ||
class Engine < ::Rails::Engine | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Bootswatch | ||
VERSION = '3.2.0.1' | ||
end |