0

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

arun
  • 11
  • 1
  • 4

2 Answers2

2

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.

Sharath Madappa
  • 3,393
  • 1
  • 24
  • 41
1

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.

Shawn
  • 8,374
  • 5
  • 37
  • 60
  • Still facing the same issue of changes are not reflected, even followed all the steps in sequence. – Biyu Sep 22 '16 at 14:14