如何在maven验证期间(或至少在声纳:声纳目标之前)在Jenkins上为CSS运行stylelint

时间:2018-12-07 16:41:09

标签: css typescript maven jenkins stylelint

我想知道如何在我的Maven构建过程中运行分析。

我正在使用Maven前端插件。

我在验证正常的阶段尝试安装stylelint。

从我的pom.xml:

<build>
<plugins>
  <plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.6</version>
    <executions>
      <execution>
        <id>install node and npm</id>
        <goals>
          <goal>install-node-and-npm</goal>
        </goals>
        <configuration>
          <nodeVersion>v10.14.0</nodeVersion>
          <npmVersion>6.4.1</npmVersion>
        </configuration>
      </execution>
      <execution>
        <id>npm install</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>generate-resources</phase>
        <configuration>
          <arguments>install --registry=https://<HIDDEN></arguments>
        </configuration>
      </execution>
      <execution>
        <id>npm run build</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
          <arguments>run build</arguments>
        </configuration>
      </execution>
      <!--<execution>
          <id>npm run test</id>
          <goals>
              <goal>npm</goal>
          </goals>
          <phase>test</phase>
          <configuration>
              <arguments>run test</arguments>
          </configuration>
      </execution>-->
      <execution>
        <id>npm run lint</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>verify</phase>
        <configuration>
          <arguments>run lint</arguments>
        </configuration>
      </execution>
      <execution>
        <id>npm install stylelint</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>verify</phase>
        <configuration>
          <arguments>npm install stylelint --save-dev</arguments>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

但是,我不知道如何在maven验证阶段运行stylelint以便它生成报告

0 个答案:

没有答案