I worked out how to integrate Sass into my Hippo 12.1 project and thought I would share the steps for anyone else. Any thoughts or improvements are welcome.
To begin I create two new directories:
/myhippoproject/repository-data/webfiles/src/main/resources/site/css
/myhippoproject/repository-data/webfiles/src/main/resources/site/scss
The Sass templates go in the scss directory. You can use subfolders.
Now update the POM file here:
/myhippoproject/repository-data/webfiles/pom.xml
Under project > build > plugins add:
<plugin>
<groupId>nl.geodienstencentrum.maven</groupId>
<artifactId>sass-maven-plugin</artifactId>
<version>2.20</version>
<executions>
<execution>
<id>generate-css-using-sass</id>
<goals>
<goal>update-stylesheets</goal>
</goals>
</execution>
</executions>
<configuration>
<sassSourceDirectory>${basedir}/src/main/resources/site/scss</sassSourceDirectory>
<destination>${basedir}/src/main/resources/site/css/</destination>
</configuration>
</plugin>
The next time you run mvn verify the build process will scan for .scss files in the scss directory and write them to the css directory with the exact same subfolder structure.
To have your Sass files automatically processed while you are developing locally you can run the project then open a separate terminal window and run the following commands:
cd /path/to/myhippoproject/repository-data/webfiles
mvn sass:watch
You can view more options for the Sass Compiler Plugin on
their homepage.
Hope this helps.