Page 1 of 1

<blc:bundle

Posted: Wed Dec 18, 2013 11:43 am
by Miker11
Hi, where is lib.js or heatcleanic.js files saved, or situated? And how they uses, or where they uses?

Code: Select all

<blc:bundle name="lib.js"
                mapping-prefix="/js/"
                files="plugins.js,
                       libs/jquery.MetaData.js,
                       libs/jquery.rating.pack.js,
                       libs/jquery.dotdotdot-1.5.1.js" />
   
    <blc:bundle name="heatclinic.js"
                mapping-prefix="/js/"
                files="BLC.js,
                       heatClinic.js,
                       cartOperations.js,
                       checkoutOperations.js,
                       globalOnReady.js,
                       manageAccountOperations.js,
                       reviewOperations.js" />

Re: <blc:bundle

Posted: Wed Dec 18, 2013 2:07 pm
by phillipuniverse
This is the ResourceBundleProcessor that invokes the ResourceBundlingService under the covers. With this processor, you can add multiple js files and, if it is enabled, it will combine them all together, minify the results and generate a unique name based on a hash of the contents. This way, you can reliably redeploy versions of your js without worrying about browsers continuing to cache the old version.

The use case is to enable it in production (bundle.enabled=true) and then disable it in development (bundle.enabled=false). You would put those values in development.properties and production.properties. When bundling is disabled, each javascript file is returned exactly how it appears on your file system (no minifying, no combining).

When it is enabled, the bundle is stored in ${asset.server.file.system.path}/bundles.