Skip to content

Instantly share code, notes, and snippets.

@ppcano
Created March 13, 2012 16:22
Show Gist options
  • Save ppcano/2029728 to your computer and use it in GitHub Desktop.
Save ppcano/2029728 to your computer and use it in GitHub Desktop.
Attempting concat multiple match to contact to the same output file
input "assets/vendor" do
match "*.js" do
filter Rake::Pipeline::OrderingConcatFilter,
["minispade.js", "qrcode.js", "jquery.js", "jquery.transit.js"], "app.js"
end
end
input "packages" do
match "*/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
end
input "app" do
match "*/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
end
<script type="text/javascript" src="source/app.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment