extract paths in Assetfile; rename javascripts to scripts, stylesheets to styles
This commit is contained in:
parent
9440ccaf7d
commit
7b47863014
20
AssetFile
20
AssetFile
|
@ -6,13 +6,17 @@ require 'compass'
|
||||||
|
|
||||||
roots ||= [Pathname.new(File.expand_path('.'))]
|
roots ||= [Pathname.new(File.expand_path('.'))]
|
||||||
|
|
||||||
Compass.configuration.images_path = 'assets/images'
|
paths = %w(styles scripts images static).inject({}) do |paths, type|
|
||||||
Compass.configuration.add_import_path File.expand_path('../assets/stylesheets', __FILE__)
|
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
|
Travis::Version.update
|
||||||
|
|
||||||
output 'public/javascripts'
|
output 'public/scripts'
|
||||||
input roots.map { |root| root.join('assets/javascripts').to_s } do
|
input paths[:scripts] do
|
||||||
match 'app/templates/**/*.hbs' do
|
match 'app/templates/**/*.hbs' do
|
||||||
filter Travis::HandlebarsFilter
|
filter Travis::HandlebarsFilter
|
||||||
concat 'app/templates.js'
|
concat 'app/templates.js'
|
||||||
|
@ -46,8 +50,8 @@ input roots.map { |root| root.join('assets/javascripts').to_s } do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
output 'public/stylesheets'
|
output 'public/styles'
|
||||||
input roots.map { |root| root.join('assets/stylesheets').to_s } do
|
input paths[:styles] do
|
||||||
match '**/*.{scss,sass}' do
|
match '**/*.{scss,sass}' do
|
||||||
filter Rake::Pipeline::Web::Filters::SassFilter
|
filter Rake::Pipeline::Web::Filters::SassFilter
|
||||||
concat [], 'application.css'
|
concat [], 'application.css'
|
||||||
|
@ -55,14 +59,14 @@ input roots.map { |root| root.join('assets/stylesheets').to_s } do
|
||||||
end
|
end
|
||||||
|
|
||||||
output 'public/images'
|
output 'public/images'
|
||||||
input roots.map { |root| root.join('assets/images').to_s } do
|
input paths[:images] do
|
||||||
match '**/*' do
|
match '**/*' do
|
||||||
copy
|
copy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
output 'public'
|
output 'public'
|
||||||
input roots.map { |root| root.join('assets/public').to_s } do
|
input paths[:static] do
|
||||||
match '**/*' do
|
match '**/*' do
|
||||||
copy
|
copy
|
||||||
end
|
end
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user