c# - How to pre-generate js bundles outside web application? -


I am working on a web application on which the code was packed in bundles using System.Web There are JS scripts. Optimization library.

To minimize the response time for first users, I prepare all the bundles in Application_Start and force them to be added to the cache. Of course, this changed in the time of Application_Start

I managed to save the result of the file generated bundle response () and then Load the contents of these files in the cache in Application_Start , but it requires two times to run the application: the first "cold" starts and prepares the script and saves them in the file, while the second Can use ready script and use Public abstract class FileBasedBundle: Bundle {Public Override Bundle Response Generated Bundle Response {if (File.Exists (BundlePath)} {var content = File.ReadAllText (bundlePath); Var fileLit = GenerateFileList (reference); Return new bundle response (content, file list); } Var response = base.GenerateBundleResponse (reference); File. Write all text (bundle, feedback content); Return feedback; Question} is The question is: How can I create bundles in some use or script to deploy on remote machines to start the application again? Whether to run outside web app reference system. Web. Are there any alternatives to optimization? Thanks!

This bundler may try - compilation & amp; Minimize short / sausage / stylus / css / js / coffee scripts / live scripts files.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -