Created
March 13, 2012 17:38
-
-
Save ppcano/2030110 to your computer and use it in GitHub Desktop.
assetfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input "app" do | |
match "app/lib/**/*.js" do | |
minispade :rewrite_requires => true, :string=> false, :module_id_generator => proc { |input| | |
id = input.path.dup | |
id.sub!('/lib/', '/') | |
id.sub!(/\.js$/, '') | |
id.sub!(/\/main$/, '') | |
#id.sub!('/tests', '/~tests') | |
id | |
} | |
filter ConcatFilter, "app.js" | |
end | |
# also include app, it could be improved | |
match "packages/*/lib/**/*.js" do | |
minispade :rewrite_requires => true, :string=> false, :module_id_generator => proc { |input| | |
id = input.path.dup | |
id.sub!('packages/', '') | |
id.sub!('/lib/', '/') | |
id.sub!(/\.js$/, '') | |
id.sub!(/\/main$/, '') | |
#id.sub!('/tests', '/~tests') | |
id | |
} | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/cordova-1.5.0.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/jquery.ui.map.min.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/jquery.qrcode.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/jquery.transit.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/jquery.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/qrcode.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
match "vendor/minispade.js" do | |
uglify if ( ENV['YOIN_ENV'] == 'prod' ) | |
filter ConcatFilter, "app.js" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment