Giter VIP home page Giter VIP logo

Comments (13)

melloware avatar melloware commented on July 21, 2024 1

Works exactly like the old plugin now but WAY faster. Thanks again for your great work.

from dart-sass-maven-plugin.

cleydyr avatar cleydyr commented on July 21, 2024

Hey, @melloware. Can you post the relevant configuration section of your pom.xml file so that I can check it out?

from dart-sass-maven-plugin.

melloware avatar melloware commented on July 21, 2024

Sure its right here: https://github.com/primefaces/primefaces/blob/master/primefaces-showcase/pom.xml

from dart-sass-maven-plugin.

cleydyr avatar cleydyr commented on July 21, 2024

Ok. So, I guess by invoking mvn io.github.cleydyr:dart-sass-maven-plugin:0.2.0:watch-sass directly maven is not supposed to get the configuration from your pom.xml. Or is it?

from dart-sass-maven-plugin.

melloware avatar melloware commented on July 21, 2024

that is how sass:watch worked in the old plugin. It used your pom.xml config for the watch.

from dart-sass-maven-plugin.

cleydyr avatar cleydyr commented on July 21, 2024

I see that if you put the configuration inside a specific execution, you'll have to specify the execution id when calling the plugin. So, in your case it should be dart-sass:watch-sass@generate-css-using-sass. If you simply call dart-sass:watch-sass (or its fully qualified equivalent), then only the general plugin config will be read.

Does it make sense?

from dart-sass-maven-plugin.

melloware avatar melloware commented on July 21, 2024

Yep that works. Can you update the readme I don't think others would figure that out!

from dart-sass-maven-plugin.

cleydyr avatar cleydyr commented on July 21, 2024

Isn't it the the expected Maven behavior?

from dart-sass-maven-plugin.

melloware avatar melloware commented on July 21, 2024

so i am just going on the old Ruby sass plugin where once it was configured in the pom.xml you could run sass:watch or sass:compile and both used the plugins values from the pom.xml regardless of execution cycle.

I look at it as the plugin is configured in the pom.xml. It has a default lifecycle but any calls to the plugin should execute based on the configuration in the pom.xml by default. I thought that is is how most Maven plugins work?

from dart-sass-maven-plugin.

cleydyr avatar cleydyr commented on July 21, 2024

I've checked https://maven.apache.org/pom.html and the executions example corroborates my hypothesis.

Consider this sample:

<plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>echodir</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>verify</phase>
            <inherited>false</inherited>
            <configuration>
              <tasks>
                <echo>Build Dir: ${project.build.directory}</echo>
              </tasks>
            </configuration>
          </execution>
        </executions>
 
      </plugin>

If I add it to a project's pom.xml, then execute antrun:run the echo task is not executed, while if I execute antrun:run@echodir, then the echo task is executed.

Is there something I'm missing in this case?

from dart-sass-maven-plugin.

melloware avatar melloware commented on July 21, 2024

Hmmm so this was the plugin configuration we used before switching to your plugin...

         <plugin>
                <groupId>nl.geodienstencentrum.maven</groupId>
                <artifactId>sass-maven-plugin</artifactId>
                <version>3.7.2</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>update-stylesheets</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sassSourceDirectory>${basedir}/src/main/webapp/resources/showcase/css</sassSourceDirectory>
                    <destination>${basedir}/src/main/webapp/resources/showcase/css</destination>
                    <sassOptions>
                        <always_update>true</always_update>
                        <sourcemap>:none</sourcemap>
                    </sassOptions>
                </configuration>
            </plugin>

Same as yours has an execution and goals. However if I ran mvn sass:watch it watched the correct directory using the plugin's config.

Same is if I run the mvn war:war plugin it uses the pom.xml even though that has an execution and goals as well. It builds the war based on the pom.xml config.

from dart-sass-maven-plugin.

cleydyr avatar cleydyr commented on July 21, 2024

The issue is not having an execution. The issue is having an execution X, putting the plugin configuration inside that execution X and then invoking the plugin without specifying the execution X. Notice that your old plugin configuration was outside the execution.

from dart-sass-maven-plugin.

melloware avatar melloware commented on July 21, 2024

HA i didn't even noticed that I cut and pasted your example. I just moved it outside of the execution and it works!

Whoops!

from dart-sass-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.