Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: running filters on files #44

Open
bomberstudios opened this issue Mar 1, 2012 · 1 comment
Open

Request: running filters on files #44

bomberstudios opened this issue Mar 1, 2012 · 1 comment

Comments

@bomberstudios
Copy link

There's one thing I used quite a lot with nanoc, and think would make a killer addition to stasis: file filters.

The idea would work something like this:

# controller.rb

before /*.png/ do
  filter some_method
end

where some_method takes a file path as argument, transforms the file, and sends it back to stasis.

It would be great for image files (for running them through smusher, for example)

@kammerer
Copy link

It seems that instead should do exactly what you want:

before /\.png$/ do
  instead MyFancyFilter.process(_stasis.path)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants