softprops / less-sbt

type less css in your sbt projects
Other
45 stars 18 forks source link

outAppend key #22

Closed eltimn closed 12 years ago

eltimn commented 12 years ago

Hi,

This commit adds an outAppend key that allows the user to append a string to the output filename. I added this to the sbt-closure [1] plugin as well and lets me add a version string to the output file.

You can then take the outAppend key, add it to the sbt-buildinfo [2] plugin, and generate a url to the css file.

Let me know what you think.

Tim

1 - https://github.com/eltimn/sbt-closure/commit/3bb56743e5c871d40e5a8db44b9269d791214a45 2 - https://github.com/sbt/sbt-buildinfo

softprops commented 12 years ago

Thanks @eltimn. I'll have a look at this tonight. Sounds useful. I'm flattered by your use of code in the google closure plug-in.

eltimn commented 12 years ago

After I submitted this I came across Jammit that combines css and js compilation and versioning into a single app. I'm now thinking about building an sbt plugin that does this instead of using what I submitted.

The main flaw with what I submitted is that if you have multiple source files, they'll all use the same outAppend string, which is not optimal.

Fell free to ignore this pull request if you want.

Thanks for looking at it and I wouldn't have been able to build the sbt-closure plugin without your example to work off, so thanks for that as well.

softprops commented 12 years ago

no problem. I'd still recommend keeping it around, I can help maintain it if you want. There are still advantages to single purpose tool I think.

eltimn commented 12 years ago

I'll keep it around. I'm still using it and I'm not sure when I'd be able to build the new plugin.