diff options
author | Thomas McDonald <tom@conceptcoding.co.uk> | 2012-05-12 11:24:22 +0400 |
---|---|---|
committer | Thomas McDonald <tom@conceptcoding.co.uk> | 2012-05-12 11:24:22 +0400 |
commit | 931fbc67b4911e65b0c8809b636f672ed501f3d1 (patch) | |
tree | 3a2516134a24eb81471504789b1629b9564dc3ad /Rakefile | |
parent | cf14f13b44db5b1afae28c127e59344d2b70860a (diff) |
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.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -5,4 +5,14 @@ Rake::TestTask.new do |t| t.verbose = true end +desc 'Dumps output to a CSS file for testing' +task :debug do + require 'sass' + require './lib/bootstrap-sass/compass_functions' + require './lib/bootstrap-sass/rails_functions' + path = './vendor/assets/stylesheets' + engine = Sass::Engine.for_file("#{path}/_bootstrap.scss", syntax: :scss, load_paths: [path]) + File.open('./debug.css', 'w') { |f| f.write(engine.render) } +end + task default: :test
\ No newline at end of file |