Minify JS and CSS and addRoutes

2 views
Skip to first unread message

Haisheng Wu

unread,
Dec 28, 2011, 10:12:18 PM12/28/11
to sn...@snapframework.com

Hello guys, 
  Not sure whether this is a right place to ask such newbie questions.
  And thank you in advance your help.

  1. Does snap already have a functionality to minify JS and CSS while at production compilation?
  2. line `addRoutes [ ("", serveStaticPages) ]` at snap-static-web
   there is no sub-url for this router, how snap know when to use `serveStaticPages`?
   I'm thinking there a document about this but cant find it.

-Simon

MightyByte

unread,
Dec 28, 2011, 11:25:16 PM12/28/11
to Haisheng Wu, sn...@snapframework.com
On Wed, Dec 28, 2011 at 10:12 PM, Haisheng Wu <fre...@gmail.com> wrote:
>
> Hello guys,
>   Not sure whether this is a right place to ask such newbie questions.
>   And thank you in advance your help.
>
> Does snap already have a functionality to minify JS and CSS while at
> production compilation?

We don't have anything for this right now, but it shouldn't be too
hard to do and we're very willing to accept code.

> line `addRoutes [ ("", serveStaticPages) ]` at snap-static-web
>
>    there is no sub-url for this router, how snap know when to
> use `serveStaticPages`?

This just means that no routing prefix is required. serveStaticPages
will do some route matching on its own and if nothing matches, it will
fail and the next handler attached to "" will be called.

Reply all
Reply to author
Forward
0 new messages