Javascript / CSS minification

21 views
Skip to first unread message

rafudu

unread,
Jul 20, 2010, 1:36:32 PM7/20/10
to Haml
Hi!

Is it possible to minify the code inside the :javascript blocks
automatically? It would be good if the :sass / :css could have the
same option.

regards,

rapha

Nathan Weizenbaum

unread,
Jul 20, 2010, 1:41:16 PM7/20/10
to ha...@googlegroups.com
This is not possible currently, since filters don't take options.


--
You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.


David Balatero

unread,
Jul 20, 2010, 1:42:51 PM7/20/10
to ha...@googlegroups.com
Unless it was a global setting, not a per-filter setting?

Nathan Weizenbaum

unread,
Jul 20, 2010, 1:58:25 PM7/20/10
to ha...@googlegroups.com
That's true, that would also work. The question then is how to do the minification itself.

David Balatero

unread,
Jul 20, 2010, 2:00:40 PM7/20/10
to ha...@googlegroups.com
It feels a little out of scope of the haml project, but that's just my first instinct. Maybe there's a simple way to drop in that functionality (optionally) -- via a separate plugin gem, maybe?

Bradley Grzesiak

unread,
Jul 20, 2010, 2:01:33 PM7/20/10
to ha...@googlegroups.com
You could just write your own :jsmin filter.

:brad
Bradley Grzesiak
co-founder, bendyworks llc
http://bendyworks.com/

Nathan Weizenbaum

unread,
Jul 20, 2010, 2:01:50 PM7/20/10
to ha...@googlegroups.com
It shouldn't be that hard to override the relevant filters in a plugin.
Reply all
Reply to author
Forward
0 new messages