On Aug 18, 11:10 pm, Ian Bicking <[EMAIL PROTECTED]> wrote:
> Stou Sandalski wrote:
> > Hi,
>
> > I was wondering if there is a way to execute some python during the
> > deployment egg process. I want to compress the javascript files and
> > maybe strip comments from the templates, before including them in the
> > egg.
>
> There's a tool to assist in this in WebHelpers. It's not well
> documented, but we use it in TaskTracker. The setup is completely
> within your setup.cfg; here's our setup:
>
> https://svn.openplans.org/svn/TaskTracker/trunk/setup.cfg
>
> Look in [compress_resources]. Also [aliases] makes sure the command is
> run everytime an egg is built (and I think everytime you do python
> setup.py develop).
That's actually very nice, I had to put
[global]
command_packages=webhelpers.commands
at the top of my page and it worked. However I want the javascript
compressed only in the egg, and not combined into one file... since it
may be a lot of work to change all the different JS includes to use
this combined file during production.... I can probably modify the web-
helpers command enough to get it to do what I want.
Thank you,
Stou
> > Also, is there an easy way to set images/javascript/css and other
> > static files to be served by lighthttpd or apache, while leaving the
> > rest of the controllers/actions to be processed by Paste? The only
> > way I can think of is using mod_rewrite.
>
> Note you can use a -f RewriteCond to make the rewrite rule somewhat
> seamless. There's probably some useful pattern with Routes too.
>
> --
> Ian Bicking : [EMAIL PROTECTED] :http://blog.ianbicking.org
> : Write code, do good :http://topp.openplans.org/careers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---