Skip to content

Instantly share code, notes, and snippets.

@stevekane
Last active December 14, 2015 00:48
Show Gist options
  • Save stevekane/5001195 to your computer and use it in GitHub Desktop.
Save stevekane/5001195 to your computer and use it in GitHub Desktop.
Example of Assetfile used with rake pipeline
Use gem to get rake-pipeline and rake-pipeline-web-filters (both on github w/ docs on installation/setup)
create an Assetfile in your project's root that looks something like the one shown below:
The handlebars compilation section is in the middle though you may check out the others for edification or whatnot.
require 'rake-pipeline-web-filters'
input "static" do
output "static/"
#compile the JS files that the coffeescript compiler outputs and wrap using minispade
match "compiledJS/**/*.js" do
minispade :rewrite_requires => true, :string => false, :module_id_generator => proc { |input|
id = input.path.dup
id.sub!('compiledJS/', '')
id
}
concat "js/src/applicationcompiled.js"
end
#compile handlebars templates into Ember.TEMPLATES
match "coffee/**/*.handlebars" do
handlebars
concat "js/src/applicationtemplates.js"
end
#SASS compile from single main.sass file which imports all partials
match "sass/main.sass" do
sass
concat "css/application.css"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment