lucasmazza/spriteful — pull request #18 by lucasmazza (2014-05-26 14:29:06+00:00)
Title: Support custom Stylesheet templates

To let features like #12 and #16 without flooding the CLI with new options, I'm thinking of adding support for custom ERB stylesheet templates so users can do whatever they want do to with some ruby and an ERB file, like this:

```bash
$ spriteful image/icons -t templates/spriteful.css.erb
```
The template scope would have the [`Spriteful::Sprite`](https://github.com/lucasmazza/spriteful/blob/master/lib/spriteful/sprite.rb) instance and the bunch of helper methods that [`Spriteful::Stylesheet`](https://github.com/lucasmazza/spriteful/blob/master/lib/spriteful/stylesheet.rb#L104-L136) has for the template stuff.

Also would be epic to have a `spriteful template [-f FORMAT]` subcommand to copy one of the existing templates to the user cwd as a starting point to hack around with custom template - it would be a great time to expand this API if there is any other method that could be useful for custom templates and improve the test coverage of this stuff.

#### TODO

- [x] Basic support (#19)
- [ ] Updated documentation
- [ ] Template generator
- [ ] Revamped internals

/cc @rafaelfranca @fnando @eshiota