Created
August 19, 2019 02:37
-
-
Save yangl/fe667e1b41b628b5dd192ae0f679f8eb to your computer and use it in GitHub Desktop.
项目内自定义Node.js版本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>com.github.eirslett</groupId> | |
<artifactId>frontend-maven-plugin</artifactId> | |
<version>1.8.0</version> | |
<configuration> | |
<workingDirectory>${project.basedir}</workingDirectory> | |
<nodeVersion>v8.16.1</nodeVersion> | |
<downloadRoot>http://npm.taobao.org/mirrors/node/</downloadRoot> | |
</configuration> | |
<executions> | |
<execution> | |
<id>install node and npm</id> | |
<goals> | |
<goal>install-node-and-npm</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>npm install</id> | |
<goals> | |
<goal>npm</goal> | |
</goals> | |
<configuration> | |
<arguments>install --registry=https://registry.npmjs.org/</arguments> | |
</configuration> | |
</execution> | |
<execution> | |
<id>npm run build</id> | |
<goals> | |
<goal>npm</goal> | |
</goals> | |
<configuration> | |
<arguments>run build</arguments> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<!--<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>exec-npm-install</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>exec</goal> | |
</goals> | |
<configuration> | |
<executable>npm</executable> | |
<arguments> | |
<argument>install</argument> | |
</arguments> | |
</configuration> | |
</execution> | |
<execution> | |
<id>exec-npm-run-build</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>exec</goal> | |
</goals> | |
<configuration> | |
<executable>npm</executable> | |
<arguments> | |
<argument>run</argument> | |
<argument>build</argument> | |
</arguments> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin>--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment