diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2015-08-31 04:25:05 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2015-08-31 04:37:24 +0300 |
commit | d16ea456cb68f9cd0ce5fd623932f72c465d7bf3 (patch) | |
tree | 88368f3f7213096cfeb1f0fdfa5b279c7914ac2e /Rakefile | |
parent | 5e44c6edd7f23c94da95b00a723004b5053a8cdb (diff) |
Update and fix `rake dummy_rails`
* Fix the task
* Rename to `rake rails_server`
* Add tether as a development dependency
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,7 +1,6 @@ lib_path = File.join(File.dirname(__FILE__), 'lib') $:.unshift(lib_path) unless $:.include?(lib_path) -require './lib/bootstrap' require 'rake/testtask' Rake::TestTask.new do |t| t.libs << 'test' @@ -12,10 +11,14 @@ end desc 'Dumps output to a CSS file for testing' task :debug do require 'sass' + require './lib/bootstrap' + require 'term/ansicolor' path = Bootstrap.stylesheets_path %w(_bootstrap _bootstrap-flex _bootstrap-reboot _bootstrap-grid).each do |file| engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path]) - File.open("./tmp/#{file}.css", 'w') { |f| f.write(engine.render) } + out = File.join('tmp', "#{file[1..-1]}.css") + File.write(out, engine.render) + $stderr.puts Term::ANSIColor.green "Compiled #{out}" end end @@ -25,8 +28,8 @@ task :update, :branch do |t, args| Updater.new(branch: args[:branch]).update_bootstrap end -desc 'Start a dummy (test) Rails app server' -task :dummy_rails do +desc 'Start a dummy Rails app server' +task :rails_server do require 'rack' require 'term/ansicolor' port = ENV['PORT'] || 9292 |