warmuuh / libsass-maven-plugin

libsass wrapper for maven
115 stars 41 forks source link

mvn libsass:watch custom output path #81

Open bpetridean opened 5 years ago

bpetridean commented 5 years ago

While running in watch mode the Output Path is set to target by default, how can I set it to another location?

Thanks, Bogdan.

warmuuh commented 5 years ago

it should work similarly to how you set up the output path normally, see https://github.com/warmuuh/libsass-maven-plugin/blob/master/README.md#usage

bpetridean commented 5 years ago

I have the following config in my pom.xml

  <plugin>
                <groupId>com.github.warmuuh</groupId>
                <artifactId>libsass-maven-plugin</artifactId>
                <version>${libsass.version}</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <inputPath>${project.basedir}/src/main/sass/assets/style/</inputPath>
                            <outputPath>${webappDirectory}/assets/style/</outputPath>
                            <sourceMapOutputPath>${webappDirectory}/assets/style/</sourceMapOutputPath>
                            <outputStyle>compressed</outputStyle>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Which works just fine upon compilation.

Then, for the css developers I also wanna activate the watcher and I do this:

mvn -X libsass:watch and the Output Path is set to .../target

Is there a way to set the outputPath through cmd line args? e.g. mvn -X libsass:watch -DoutputPath="/custom"

Thank you.

warmuuh commented 5 years ago

try putting the configuration like i linked (not inside execution but inside the tag. this will then be picked up by "manual" executions of direct goals afaik.