Skip to content

Commit

Permalink
Merge pull request #41 from phillip-kruger/1.0.1
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
phillip-kruger authored Aug 23, 2023
2 parents 6b0da0e + 5e22a60 commit fd664e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<groupId>io.mvnpm</groupId>
<artifactId>esbuild-java</artifactId>
<name>esbuild wrapper for java</name>
<version>1.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<version>1.0.1</version>

<description>Small wrapper around esbuild to be able to use it in java</description>

<url>https://github.com/mvnpm/esbuild-java/</url>
Expand Down Expand Up @@ -95,7 +95,7 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -127,7 +127,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<version>1.2.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
Expand Down Expand Up @@ -186,7 +186,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -199,7 +199,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -212,7 +212,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/io/mvnpm/esbuild/model/EsBuildConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ public String[] toParams() {
} else if ("entryPoint".equals(field.getName())) {
result.addAll(List.of((String[]) value));
} else if (!(value instanceof Boolean)) {
result.add("--%s=%s".formatted(convertField(fieldName), value));
String fn = convertField(fieldName);
String v = value.toString();
if(!fn.equals("outdir")){
v = v.toLowerCase();
}
result.add("--%s=%s".formatted(fn, v));
}
}
} catch (IllegalAccessException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void shouldOutputStandardFlags() {
"--loader:.gif=file", "--loader:.css=css", "--loader:.jpg=file", "--loader:.eot=file", "--loader:.json=json",
"--loader:.ts=ts", "--loader:.png=file", "--loader:.ttf=file", "--loader:.woff2=file", "--loader:.jsx=jsx",
"--loader:.js=js", "--loader:.woff=file", "--loader:.tsx=tsx", "--outdir=/tmp", "--sourcemap",
"--splitting", "--entry-names=[name]-[hash]"}, params);
"--splitting", "--entry-names=[name]-[hash]", "--asset-names=assets/[name]-[hash]"}, params);
}

@Test
Expand Down

0 comments on commit fd664e9

Please sign in to comment.