Skip to content

Instantly share code, notes, and snippets.

@dudleyf
Created January 12, 2012 21:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dudleyf/1603170 to your computer and use it in GitHub Desktop.
Save dudleyf/1603170 to your computer and use it in GitHub Desktop.
StylusFilter
class StylusFilter < Rake::Pipeline::Filter
def initialize(&block)
block ||= proc { |input| input.sub(/\.styl$/, '.css') }
super(&block)
end
def generate_output(inputs, output)
inputs.each do |input|
output.write `stylus #{input.fullpath}`
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment