extract paths in Assetfile; rename javascripts to scripts, stylesheets to styles

This commit is contained in:
Sven Fuchs 2012-10-03 17:12:23 +02:00
parent 9440ccaf7d
commit 7b47863014
135 changed files with 36856 additions and 13 deletions

View File

@ -6,13 +6,17 @@ require 'compass'
roots ||= [Pathname.new(File.expand_path('.'))]
Compass.configuration.images_path = 'assets/images'
Compass.configuration.add_import_path File.expand_path('../assets/stylesheets', __FILE__)
paths = %w(styles scripts images static).inject({}) do |paths, type|
paths.merge(type.to_sym => roots.map { |root| root.join("assets/#{type}").to_s })
end
Compass.configuration.images_path = paths[:images].first
Compass.configuration.add_import_path paths[:styles].first
Travis::Version.update
output 'public/javascripts'
input roots.map { |root| root.join('assets/javascripts').to_s } do
output 'public/scripts'
input paths[:scripts] do
match 'app/templates/**/*.hbs' do
filter Travis::HandlebarsFilter
concat 'app/templates.js'
@ -46,8 +50,8 @@ input roots.map { |root| root.join('assets/javascripts').to_s } do
end
end
output 'public/stylesheets'
input roots.map { |root| root.join('assets/stylesheets').to_s } do
output 'public/styles'
input paths[:styles] do
match '**/*.{scss,sass}' do
filter Rake::Pipeline::Web::Filters::SassFilter
concat [], 'application.css'
@ -55,14 +59,14 @@ input roots.map { |root| root.join('assets/stylesheets').to_s } do
end
output 'public/images'
input roots.map { |root| root.join('assets/images').to_s } do
input paths[:images] do
match '**/*' do
copy
end
end
output 'public'
input roots.map { |root| root.join('assets/public').to_s } do
input paths[:static] do
match '**/*' do
copy
end

Some files were not shown because too many files have changed in this diff Show More