make Assetfile more agnostic
This commit is contained in:
parent
5166e65e84
commit
d67e0b23bc
12
AssetFile
12
AssetFile
|
@ -6,7 +6,7 @@ require 'compass'
|
|||
|
||||
roots ||= [Pathname.new(File.expand_path('.'))]
|
||||
|
||||
paths = %w(styles scripts images static).inject({}) do |paths, type|
|
||||
paths = %w(styles scripts images static vendor).inject({}) do |paths, type|
|
||||
paths.merge(type.to_sym => roots.map { |root| root.join("assets/#{type}").to_s })
|
||||
end
|
||||
|
||||
|
@ -22,11 +22,11 @@ input paths[:scripts] do
|
|||
concat 'app/templates.js'
|
||||
end
|
||||
|
||||
match %r(\.coffee$) do
|
||||
match '**/*.coffee' do
|
||||
coffee_script
|
||||
end
|
||||
|
||||
match %r(^(travis|(app|config|data|lib)/.*)\.js$) do
|
||||
match %r(^(?!vendor\/).*\.js) do
|
||||
modules = proc { |input| input.path.gsub(%r((^app/|^lib/|\.js$)), '') }
|
||||
minispade(string: true, rewrite_requires: true, module_id_generator: modules)
|
||||
concat [], ['dev/app.js', 'min/app.js']
|
||||
|
@ -41,12 +41,12 @@ input paths[:scripts] do
|
|||
filter Travis::ProductionFilter
|
||||
uglify max_line_length: 32 * 1024, squeeze: true
|
||||
filter Travis::SafeConcatFilter do
|
||||
'application.min.js'
|
||||
'app.min.js'
|
||||
end
|
||||
end
|
||||
|
||||
match 'dev/**/*.js' do
|
||||
concat 'application.js'
|
||||
concat 'app.js'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -54,7 +54,7 @@ output 'public/styles'
|
|||
input paths[:styles] do
|
||||
match '**/*.{scss,sass}' do
|
||||
filter Rake::Pipeline::Web::Filters::SassFilter
|
||||
concat [], 'application.css'
|
||||
concat [], 'app.css'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Travis CI - Distributed Continuous Integration Platform for the Open Source Community</title>
|
||||
<link rel="icon" type="image/png" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="/styles/application.css">
|
||||
<script src="/scripts/application.js"></script>
|
||||
<link rel="stylesheet" href="/styles/app.css">
|
||||
<script src="/scripts/app.min.js"></script>
|
||||
<script>
|
||||
minispade.require('app')
|
||||
Travis.run()
|
||||
|
|
File diff suppressed because one or more lines are too long
21
public/scripts/application.min.js
vendored
21
public/scripts/application.min.js
vendored
File diff suppressed because one or more lines are too long
6669
public/styles/app.css
Normal file
6669
public/styles/app.css
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
32e9623f
|
||||
1028fd23
|
Loading…
Reference in New Issue
Block a user