PreConsolidation on the fly

Jul 29, 2009 at 2:06 PM

Hello Andy,

First of all thank you for the great library!

What do you think about optional creation of preconsolidated scripts on the fly? E.g. on the first call to a page a preconsolidated js files are generated and then served as static files. It will allow to eliminate post build preconsolidation. It is usefull for small projects without MsBuild.

Do you see any objections/possible obstacles? 

Oct 25, 2009 at 6:11 PM

That is an interesting idea.  It would certainly be possible to do that in the Application_Startup event.  Are you primarily interested in this for a deployed environment, or also the local dev environment?

Oct 27, 2009 at 5:51 PM
Edited Oct 28, 2009 at 7:49 AM

Honestly I have already implemented this feature in my project. I had to modify your component alittle. I don't use Application_Startup event, instead I check that preconsolidated file exists. If it does not exist I generate it. To avoid checking file existence each request I use cache.