How to trigger LESS/SASS compiler manually in Netbeans

16,327

Solution 1

I believe it is not possible. But perhaps you could try to open project properties (right click on project) and in css preprocessors setting (see here) try one of following:

  • uncheck the "Compile on Save" option, confirm dialog and the open project properties again and check this option back. It could trigger recompilation
  • if the above won't help, try to remove all settings in the "Watch", confirm dialog and then enter your setting in the Watch section again

Solution 2

I'm using NetBeans IDE 8.2 in August 2017, and there is a Recompile All Files button in Project Properties > CSS Preprocessors.

Solution 3

You need to change the paths of the css and less folders in your projects to the correct one. It should be relative to the project folder.

So if you have a folder named assets in the root of your project and inside it 2 folders css and less then their paths in the project CSS preprocessors settings should be /assets/less and /assets/css.

As soon as you correct this your less files should compile on next save

Share:
16,327
lbrandao
Author by

lbrandao

Updated on June 19, 2022

Comments

  • lbrandao
    lbrandao almost 2 years

    In Netbeans 7.4 you can configure LESS or SASS compilers. You can check the option to Compile on Save. That works great. But how can I trigger this action manually from Netbeans? I deleted the destination folder and want to recompile everything but I can't find how.

    • lbrandao
      lbrandao about 10 years
      An answer for PhpStorm would also be accepted ;)
    • LazyOne
      LazyOne about 10 years
    • lepe
      lepe over 9 years
      I guess the only way would be launching the console and running a command manually (for Netbeans 8)? If autocompile is not working, confirm which directory your sass files should be: go to project properties -> css preprocessors and check the Input directory.
  • IberoMedia
    IberoMedia over 6 years
    At first, I did not fully understand I need the lass and css path's relative to the project's path, but after reading lepe's comment on the original question, I figured it out. According to my configuration, my solution was, my project's path is /var/www/html/project_name and for the project's properties less and css path's I had to enter "public_html/templates/template_name/less" and "public_html/templates/template_name/css."