Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Instaneous compilation of less, coffee, running tests
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Petr Blahos  
View profile  
 More options Nov 4 2012, 2:29 pm
From: Petr Blahos <petrbla...@gmail.com>
Date: Sun, 4 Nov 2012 20:29:16 +0100
Local: Sun, Nov 4 2012 2:29 pm
Subject: Instaneous compilation of less, coffee, running tests

Hi all,

I have seen a very nice thing in the js framework este (
https://github.com/Steida/este).
What he does there, he basically has a file watcher and whenever his style
changes,
it is compiled with stylus, whenever his coffee script changes, it gets
translated to
js, whenever his js changes, tests are run.

I have started implementing this by copying pserve.py into my project and
enhancing
its file monitor with a possibility to have a callback, which is called
every second.
In this callback I (conditionally) compile my styles, and run unit tests.
It's working
nicely, but I have doubts whether this is the best way to go about it -
meaning
extending pserve. I somehow feel, that maybe this is not the right task for
pserve,
and I should do it the other way round - implement my own file monitor,
which will
control the restarting of my pyramid app, and compiling files and running
tests. I will
be greatful for any opinions.

(I know about fanstatic and pyramid_fanstatic. Good for resource inclusion,
but not
what I seek for the less/stylus-->css.)

Cheers,
Petr


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malthe Borch  
View profile  
 More options Nov 4 2012, 3:16 pm
From: Malthe Borch <mbo...@gmail.com>
Date: Sun, 4 Nov 2012 21:16:10 +0100
Local: Sun, Nov 4 2012 3:16 pm
Subject: Re: Instaneous compilation of less, coffee, running tests
On 4 November 2012 20:29, Petr Blahos <petrbla...@gmail.com> wrote:

> What he does there, he basically has a file watcher and whenever his style
> changes,
> it is compiled with stylus, whenever his coffee script changes, it gets
> translated to
> js, whenever his js changes, tests are run.

You can do this sort of thing in bash if you wanted:
https://gist.github.com/2864947.

\malthe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Randall Leeds  
View profile  
 More options Nov 4 2012, 4:45 pm
From: Randall Leeds <randall.le...@gmail.com>
Date: Sun, 4 Nov 2012 13:45:18 -0800
Local: Sun, Nov 4 2012 4:45 pm
Subject: Re: Instaneous compilation of less, coffee, running tests

You could have a look at miracle2k/webassets or tav/assetgen.
Both have pyramid integration projects and both handle content-hash-based
automatic recompilation.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Petr Blahos  
View profile  
 More options Nov 5 2012, 2:05 pm
From: Petr Blahos <petrbla...@gmail.com>
Date: Mon, 5 Nov 2012 20:04:35 +0100
Local: Mon, Nov 5 2012 2:04 pm
Subject: Re: Instaneous compilation of less, coffee, running tests

> On 4 November 2012 20:29, Petr Blahos <petrbla...@gmail.com> wrote:
> > What he does there, he basically has a file watcher and whenever his
> style
> > changes,
> > it is compiled with stylus, whenever his coffee script changes, it gets
> > translated to
> > js, whenever his js changes, tests are run.

> You can do this sort of thing in bash if you wanted:
> https://gist.github.com/2864947.

> I was thinking about using good old makefile, together with an approach

like
you mentioned. Simply: something changed? make. It has to run on Windows
though (I have no choice). I know there is make on windows too, but it
complicates
matters enormously.
--
Petr

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Petr Blahos  
View profile  
 More options Nov 5 2012, 2:09 pm
From: Petr Blahos <petrbla...@gmail.com>
Date: Mon, 5 Nov 2012 20:08:57 +0100
Local: Mon, Nov 5 2012 2:08 pm
Subject: Re: Instaneous compilation of less, coffee, running tests

> You could have a look at miracle2k/webassets or tav/assetgen.
> Both have pyramid integration projects and both handle content-hash-based
> automatic recompilation.

webassets look good. Somehow it feels better than fanstatic. Now I am
starting to
thing in a different direction, which is: If I am in a debug mode, I will
start a thread
directly in my pyramid app (probably in a modified pyramid_webassets),
which will
take care of the periodic compilation of the resources. Meaning, not when
they are
required, but when sources change (based on a set of bundles defined in
webassets).

Thanks for your pointers.
--
Petr


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Merickel  
View profile  
 More options Nov 5 2012, 2:18 pm
From: Michael Merickel <mmeri...@gmail.com>
Date: Mon, 5 Nov 2012 13:17:15 -0600
Local: Mon, Nov 5 2012 2:17 pm
Subject: Re: Instaneous compilation of less, coffee, running tests

I believe pyramid_webassets + webassets already handles compiling sources
for you based on the filters you define within each bundle.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Randall Leeds  
View profile  
 More options Nov 5 2012, 3:06 pm
From: Randall Leeds <randall.le...@gmail.com>
Date: Mon, 5 Nov 2012 12:06:50 -0800
Local: Mon, Nov 5 2012 3:06 pm
Subject: Re: Instaneous compilation of less, coffee, running tests

On Mon, Nov 5, 2012 at 11:17 AM, Michael Merickel <mmeri...@gmail.com>wrote:

> I believe pyramid_webassets + webassets already handles compiling sources
> for you based on the filters you define within each bundle.

It's true. I'm using webassets today in this way. When configured in debug
mode, it should compile assets as needed, when sources change, on every
page load. Combined with `pserve --reload`, to restart the paste server
when python files change, it makes for a very low-friction development
workflow.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andi Balke  
View profile  
 More options Nov 5 2012, 3:18 pm
From: Andi Balke <andi.ba...@googlemail.com>
Date: Mon, 5 Nov 2012 21:18:45 +0100
Local: Mon, Nov 5 2012 3:18 pm
Subject: Re: Instaneous compilation of less, coffee, running tests

hi,

just wanted to mention my two cents :)

we use fanstatic and less in our pyramid application. both things are great (though i don't know about webassets yet).

first we had the ``lessc`` in pyramid as explained here: http://www.gawel.org/weblog/en/2011/12/Using_lesscss_with_pyramid_and...
this has several disadvantages:
- compilation of a ``less`` file to ``css`` causes the app to restart, as lessc is run on start (too slow)
- lessc must be in the path when starting the app; useless restriction on a production machine and a little hazzle in a buildout environment with self-built nodejs
- no option to add another build-step like compressing the ``css`` files

we dropped the solution above and i just built a simple nodejs script that watches our files and compiles on demand (really short latency, no app restart). this watcher is automatically started in the local ``supervisord``, which is configured by buildout. on production there is no lessc or anything nodejs-related.

fanstatic itself - just to mention that - is great for us because of the excellent resource handling and the ability to package and version static files on production.

hope this helps, andi

On 05.11.2012, at 20:08, Petr Blahos wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »