Sha256: bb4b4c85f275f9f4b33dc5d953606378f62f6f46534ea08aed5a5af75a5d4714
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
#!/usr/bin/env rake require "bundler/gem_tasks" desc "Update Twitter's Bootstrap" task "update-twitter" do boostrap_version = "1.3.0" Dir["vendor/assets/stylesheets/*.*"].each {|f| FileUtils.rm(f)} Dir["vendor/twitter/lib/*.scss"].each do |file| cp file, "vendor/assets/stylesheets/", :verbose => true end bootstrap_scss = File.read("vendor/assets/stylesheets/bootstrap.scss") bootstrap_scss.gsub!(/@VERSION/, "v#{boostrap_version}") bootstrap_scss.gsub!(/@DATE/, Time.now.to_s) File.open("vendor/assets/stylesheets/bootstrap.scss", "w") do |f| f.write(bootstrap_scss) end Dir["vendor/assets/javascripts/*.*"].each {|f| FileUtils.rm(f)} js_files = Dir["vendor/twitter/js/*.js"].map() js_files.each do |file| cp file, "vendor/assets/javascripts/", :verbose => true end bootstrap_js = js_files.map{|f| "//= require #{File.basename(f)}"}.join("\n") File.open("vendor/assets/javascripts/bootstrap.js", "w") do |f| f.write "// Bootstrap v#{boostrap_version}\n" f.write(bootstrap_js) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
anjlab-bootstrap-rails-0.0.4 | Rakefile |
anjlab-bootstrap-rails-0.0.3 | Rakefile |
anjlab-bootstrap-rails-0.0.2 | Rakefile |