Sha256: 0b5583bf4c6e4a3fa10051c7f64713c113800c2dac7ecc86d80c23c43c9ca93c
Contents?: true
Size: 773 Bytes
Versions: 4
Compression:
Stored size: 773 Bytes
Contents
# Needed for pre-3.1. require "fileutils" require "find" namespace :modular do desc "Move files to the Rails assets directory." task :install, [:sass_path] do |t, args| args.with_defaults(:sass_path => 'public/stylesheets/sass') source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) FileUtils.mkdir_p("#{Rails.root}/#{args.sass_path}/modular") FileUtils.cp_r("#{source_root}/app/assets/stylesheets/.", "#{Rails.root}/#{args.sass_path}/modular", { :preserve => true }) Find.find("#{Rails.root}/#{args.sass_path}/modular") do |path| if path.end_with?(".css.scss") path_without_css_extension = path.gsub(/\.css\.scss$/, ".scss") FileUtils.mv(path, path_without_css_extension) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
modular-grid-0.0.15 | lib/tasks/install.rake |
modular-grid-0.0.14 | lib/tasks/install.rake |
modular-grid-0.0.13 | lib/tasks/install.rake |
modular-grid-0.0.12 | lib/tasks/install.rake |