我在package.json中添加了以下内容:
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
},
我正在使用grunt-maven-plugin来运行npm和grunt这样的目标:
<pluginExecution>
<pluginExecutionFilter>
<groupId>pl.allegro</groupId>
<artifactId>
grunt-maven-plugin
</artifactId>
<versionRange>
[1.5.1,)
</versionRange>
<goals>
<goal>
create-resources
</goal>
<goal>npm</goal>
<goal>grunt</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
现在我希望我能够在使用目标或以某种方式使用Grunt运行npm启动脚本。怎么可能这样做。
我知道grunt有一个打字稿的插件..但我想知道如何使用Grunt运行这个npm start?
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-war-plugin
</artifactId>
<versionRange>
[2.1.1,)
</versionRange>
<goals>
<goal>exploded</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>pl.allegro</groupId>
<artifactId>
grunt-maven-plugin
</artifactId>
<versionRange>
[1.5.1,)
</versionRange>
<goals>
<goal>
create-resources
</goal>
<goal>npm</goal>
<goal>grunt</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>