ADOBE CQ5 frequent building of clientlibs folder

4k views Asked by At

This issue is related to frequent building of client lib folder in adobe cq5.

Whenever i updating the code in js and css file, the changes are not reflected as soon as saving the related js and css file.

i have to do this url //server:port//libs/granite/ui/content/dumplibs.rebuild.html.

After clicking the "rebuild libraries" button, then only my changes are updated in the html file.

Can i have to configure any file to bypass this process?

Thanks

2

There are 2 answers

1
Shawn On

I use various options:

  • Just change the .js, .css, or .less file that is included in the library - sometimes it seems CQ will detect this and rebuild the lib without any other changes.
  • Open the js.txt or css.txt file for the library I want to rebuild, go to the end, then hit the enter key to add a new line at the bottom - this usually causes the lib to rebuild, and it is usually the fastest mechanism for me when I am working on UI stuff (in CRXDE Lite).
  • If that doesn't work, I invalidate the cache with this URL: http://localhost:4502/libs/granite/ui/content/dumplibs.rebuild.html?invalidate=true but don't rebuild the client libs (since that takes too long and rebuilds more than I need to rebuild).
  • If that still doesn't work I manually clear the libs from /var/clientlibs as a last resort (or restart my CQ instance if I have to do this a lot)

I wish I understood why sometimes CQ rebuilds the library and at other times does not when I seemingly perform the same steps. But regardless, I hope this will help or be of use to someone else.

0
Sharath Madappa On

Instead of invalidating and rebuilding all the libraries via the dumplibs.rebuild.html interface you can just selectively invalidate the changed clientlib manually. The cached copy of clientlibs are stored under /var/clientlibs. You can navigate to the required components' js and css files under /var/clientlibs/apps or /var/clientlibs/etc and delete them. They will get rebuilt when any page that uses these are requested.

Since only select libs are deleted and rebuilt, it's lot faster.