This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233627

Summary: Add way to manually trigger compiling
Product: web Reporter: Vladimir Riha <vriha>
Component: CSS Preprocessors (SASS, LESS, ...)Assignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal CC: ekubovsky
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Vladimir Riha 2013-07-30 07:00:21 UTC
If you have a lot of Sass/Less files, I think it would be useful to have also action in sass/less files' context menu to "Compile to CSS", which would trigger compiling of given file (and dependencies). The reason is if you have a lot of dependencies, it is not always wanted to compile all files upon each file save (takes some time, CPU usage is going high). 

The current way to do that is to disable compile on save, edit files, enable compile on save. Which is not comfortable.

It could be similar to FTP & upload action. In project properties, there would be switcher to either compile on save or manually.
Comment 1 Tomas Mysik 2013-07-30 07:09:34 UTC
Easy workaround is: change file path in the IDE Options and return it back ;) All the open projects will be recompiled, at least I think so...

Thanks.
Comment 2 Vladimir Riha 2013-07-30 07:14:39 UTC
Yep, but that's similar to opening project properties and enabling/disabling :)
Comment 3 PavelCibulka 2014-07-25 07:00:07 UTC
I would also welcome some option, to select which file/folder should be compiled on change at development and which on building for production. Not necessary extra button, people wold forget to click it.

I almost managed to set this in maven pom.xml by settings:

<properties>
    <org-netbeans-modules-css-prep.sass_2e_mappings>/WEB-INF/styles/test:/css/</org-netbeans-modules-css-prep.sass_2e_mappings>
</properties>

<profile>
    <id>release</id>
    <properties>
        <org-netbeans-modules-css-prep.sass_2e_mappings>/WEB-INF/styles/test:/css/,/WEB-INF/styles/lists:/css/</org-netbeans-modules-css-prep.sass_2e_mappings>
    </properties>


If I open project properties, the sass settings is right. Problem is, that sass is not executed on change project properties by switching maven profile (with different sass setting). Also sass is not executed, if scss file is update by subversion (output files are not on subversion).
Comment 4 ashfinlayson 2014-10-19 17:03:02 UTC
I agree with the comments, a manual compile option would be really useful for me because I just have one main.scss file that I want to compile on save, the other files are all scss files that are imported into my main stylesheet. 

My current workaround for this is to have my output css directory open in my project when I'm editing scss then when I save and a file is compiled a just delete it. It's still a pain in the arse though.
Comment 5 ekubovsky 2015-06-02 23:44:07 UTC
+1 to this option.

I remember one of the third-party plugins had this option and it was really helpful.

Please, implement.
Comment 6 ekubovsky 2015-06-02 23:44:56 UTC
Just forgot to add - NetBeans 8 users would benefit from this as well...