Sha256: 18dd2c7ff7e333216e81d3a003f0b8157b8308a0d577bbd55845c5b06659c3ce
Contents?: true
Size: 691 Bytes
Versions: 1
Compression:
Stored size: 691 Bytes
Contents
# desc "Explaining what the task does" # task :view_assets do # # Task goes here # end puts 'soemthing' namespace :view_assets do desc "Init view_assets framework" task :init do public_path = "#{ Rails.root }/public" %w(vendor lib app).map { |d| %w(javascripts stylesheets).map { |t| "#{public_path}/#{d}/#{t}" } }.flatten.each do |dir| FileUtils.mkdir dir puts "\t\033[1;32mCreate\033[0m #{dir}" if dir.include?('app') fn_extension = dir.include?('javascripts') ? 'js' : 'css' FileUtils.touch "Create #{dir}/application.#{fn_extension}" puts "\t\033[1;32mCreate\033[0m #{dir}/application.#{fn_extension}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
view_assets-0.0.2 | lib/tasks/view_assets_tasks.rake |