Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to speed up assets compilation for tests?

Running Guard with Spin works great to keep my testing fast, except when assets are relevant and need compiling. It seems that the test environments recompiles all assets whenever I change something in them. I've seen examples of deployment scripts that only recompile assets whose source has changed. Can this be done for testing too? Or is there another way to speed up asset compilation for tests?

I'm using a rather specific setup so I'll be happy to supply more information if needed, though I feel the answer from this question might be of use in many more cases than just mine.

like image 288
Jasper Kennis Avatar asked Nov 15 '12 10:11

Jasper Kennis


People also ask

What does rake assets Precompile do?

rake assets:precompile. We use rake assets:precompile to precompile our assets before pushing code to production. This command precompiles assets and places them under the public/assets directory in our Rails application.


1 Answers

You can take a look at this article written two months ago . It seems rather complex task . Nathan has written a gem that precompiles only changes , made to assets . It can be used in development and testing env.

EDIT : Here is another article , related with speeding up our tests . It has a different point of view about js testing .

like image 184
R Milushev Avatar answered Sep 19 '22 01:09

R Milushev