Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 931fbc6

Browse files
committedMay 12, 2012
Add rake:debug task to quickly build the CSS
Previously to ensure that changes have been working it was required to build the gem and then push it to a sample application (e.g. Rails & Compass). The rake:debug task uses plain Sass - as we do for testing, and creates the file 'debug.css' without having to rebuild the Gem and fire up an application.
1 parent cf14f13 commit 931fbc6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
 

‎.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.gem
2-
.sass-cache
2+
.sass-cache
3+
debug.css

‎Rakefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,14 @@ Rake::TestTask.new do |t|
55
t.verbose = true
66
end
77

8+
desc 'Dumps output to a CSS file for testing'
9+
task :debug do
10+
require 'sass'
11+
require './lib/bootstrap-sass/compass_functions'
12+
require './lib/bootstrap-sass/rails_functions'
13+
path = './vendor/assets/stylesheets'
14+
engine = Sass::Engine.for_file("#{path}/_bootstrap.scss", syntax: :scss, load_paths: [path])
15+
File.open('./debug.css', 'w') { |f| f.write(engine.render) }
16+
end
17+
818
task default: :test

0 commit comments

Comments
 (0)
Please sign in to comment.