diff options
author | Jan Stevens <jan@playpass.be> | 2015-08-20 12:03:54 +0300 |
---|---|---|
committer | Jan Stevens <jan@playpass.be> | 2015-08-20 12:03:54 +0300 |
commit | e66545f886d0bab97e2b6c63cebbd03b993cb2e3 (patch) | |
tree | 501f33bf1d3d20889b25fad6a6b6bb747044f03d /Rakefile | |
parent | 151274ca21cf28e87ce9330323942d271db2b91a (diff) |
Removed unused rake tasks
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 38 |
1 files changed, 7 insertions, 31 deletions
@@ -2,7 +2,7 @@ lib_path = File.join(File.dirname(__FILE__), 'lib') $:.unshift(lib_path) unless $:.include?(lib_path) load './tasks/bower.rake' - +require './lib/bootstrap-sass' require 'rake/testtask' Rake::TestTask.new do |t| t.libs << 'test' @@ -14,40 +14,16 @@ desc 'Dumps output to a CSS file for testing' task :debug do require 'sass' path = Bootstrap.stylesheets_path - %w(bootstrap).each do |file| + %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("./#{file}.css", 'w') { |f| f.write(engine.render) } + File.open("./tmp/#{file}.css", 'w') { |f| f.write(engine.render) } end end -desc 'Convert bootstrap to bootstrap-sass' -task :convert, :branch do |t, args| - require './tasks/converter' - Converter.new(branch: args[:branch]).process_bootstrap -end - -desc 'LESS to stdin -> Sass to stdout' -task :less_to_scss, :branch do |t, args| - require './tasks/converter' - puts Converter.new(branch: args[:branch]).convert_less(STDIN.read) -end - -desc 'Compile bootstrap-sass to tmp/ (or first arg)' -task :compile, :css_path do |t, args| - require 'sass' - require 'term/ansicolor' - - path = 'assets/stylesheets' - css_path = args.with_defaults(css_path: 'tmp')[:css_path] - puts Term::ANSIColor.bold "Compiling SCSS in #{path}" - Dir.mkdir(css_path) unless File.directory?(css_path) - %w(_bootstrap bootstrap/_theme).each do |file| - save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css" - puts Term::ANSIColor.cyan(" #{save_path}") + '...' - engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path]) - css = engine.render - File.open(save_path, 'w') { |f| f.write css } - end +desc 'Update bootstrap to bootstrap-sass' +task :update, :branch do |t, args| + require './tasks/updater' + Updater.new(branch: args[:branch]).update_bootstrap end desc 'Start a dummy (test) Rails app server' |