nb-springboot icon indicating copy to clipboard operation
nb-springboot copied to clipboard

Enable SASS/LESS preprocessor support for Spring Boot projects with `JAR` packaging

Open AlexFalappa opened this issue 9 years ago • 1 comments

It would be nice to enable NetBeans SASS/LESS preprocessing support on files in the src/main/resources/static folder.

See #46 for some findings made by @janScheible on this matter

AlexFalappa avatar Dec 30 '16 17:12 AlexFalappa

Thank you @AlexFalappa for your answer and for opening that new issue.

  1. Changing packaging type to war works (thanks to http://hg.netbeans.org/main-silver/rev/306e875d1344) but is not the desired solution. jar packaging is the real beauty of Spring Boot. ;-)
  2. Current workaround is to use the LESS Maven plugin
    <plugin>
     <groupId>org.lesscss</groupId>
     <artifactId>lesscss-maven-plugin</artifactId>
     <executions>
         <execution>
             <id>less-compile</id>
         </execution>
     </executions>
     <configuration>
         <sourceDirectory>${project.basedir}/src/main/transient-resources/less</sourceDirectory>
         <outputDirectory>${project.basedir}/src/main/resources/static/css</outputDirectory>
         <compress>true</compress>
         <includes>
             <include>main.less</include>
         </includes>
     </configuration>
    </plugin>
    
    together with a Netbeans action like
    <action>
     <actionName>CUSTOM-LESS Compile (Watch)</actionName>
     <displayName>LESS Compile (Watch)</displayName>
     <goals>
         <goal>lesscss:compile</goal>
     </goals>
     <properties>
         <lesscss.watch>true</lesscss.watch>
     </properties>
    </action>
    
  3. I would be happy if anybody could give me some pointers how to implement this ticket. I simply have no experience with developing Netbeans plugins but I'm eager to know more. :-)

janScheible avatar Jan 02 '17 19:01 janScheible