When working with LESS CSS in adobe CQ, make a note point during your check in/packaging.
When you open a page, the .less files are converted to .css files as shown below:
etc/designs/myapp/
css/static.less
etc/designs/myapp/
css/generated/static.css
css/static.less
In this case, make sure you should not check in/package your generated folder and its sub folders/files. What you want to check in/package is just your .less files.
If you check in/package the generated folder, you may run in to issues when your less files are updated. This means, when a less file is updated, the generated css file may not update with the latest code all times.
When you open a page, the .less files are converted to .css files as shown below:
etc/designs/myapp/
css/static.less
etc/designs/myapp/
css/generated/static.css
css/static.less
In this case, make sure you should not check in/package your generated folder and its sub folders/files. What you want to check in/package is just your .less files.
If you check in/package the generated folder, you may run in to issues when your less files are updated. This means, when a less file is updated, the generated css file may not update with the latest code all times.
Could you please elaborate the usage of .less files?
ReplyDeleteDo we need to create the generated folder under our folder structure?
Thanks,
Sony
No. we need not to create any folders. We only need to create .less files. When a page loads, .less file gets compiled, generates a .css file and puts it under "generated" folder. Even this generated folder also created by LESS compiler.
ReplyDeleteBut, when we want to check in these less files to any repositories like SVN, we only wanted to check in .less files not the generated .css files.
Let me know if you still have any confusion.
-Ramakrishna
ery useful information. thanks for sharing.
ReplyDeleteGet all recruitment details like bank recruitment.