2011/12/6 Srirangan <sriran...@gmail.com>:
> Hi,
>
> For one of my projects I have split my client app into a number of JS files.
> Am using the Express framework.
>
> I'd like to automate the minification of all these client side JS files,
> without of course modifying the original sources.
>
> I don't think it should be too different to generating CSS files from LESS,
> SASS or Stylus sources. How do I go about it?

Create a middleware. If the request is for a JS file compress it with
Uglify-js or similar, and then serve the compressed files instead.
Look at the Connect/Express middlewares, there might even be one that
does this for you.

off: posting a question to several list doesnt look to be a good idea.

-- 
Poetro

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to