Run a script after JSweet transpilation

79 Views Asked by At

I'm trying to build a TypeScript project with JSweet. After the transpilation, I want to run a script in any language to move some files around; specifically files that are already in TypeScript that don't need transpilation. I wrote a Groovy script that does just that but I can't make it run after the generate-sources instructions for JSweet.

Here's my pom.xml file: https://pastebin.com/932r9cWw

I am far from a Maven expert. I think the script shows that I'm trying to run the script scripts/addJsScripts.groovy after the transpilation, but I'm clearly doing something very wrong. The goals available to Maven Invoker plugin don't match the goals of the JSweet transpiler at all.

Is there a way to do what I'm trying to do?

1

There are 1 best solutions below

0
On

There are plenty of ways to achieve this, but this is more a Maven issue than a JSweet one.

I suggest you use the exec-maven-plugin, as explained here: I want to execute shell commands from Maven's pom.xml