Created
January 12, 2012 21:15
-
-
Save dudleyf/1603170 to your computer and use it in GitHub Desktop.
StylusFilter
This file contains hidden or 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
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