diff --git a/pom.xml b/pom.xml index 0942e8f..4a18156 100644 --- a/pom.xml +++ b/pom.xml @@ -7,8 +7,8 @@ io.mvnpm esbuild-java esbuild wrapper for java - 1.0.1-SNAPSHOT - jar + 1.0.1 + Small wrapper around esbuild to be able to use it in java https://github.com/mvnpm/esbuild-java/ @@ -95,7 +95,7 @@ maven-surefire-plugin - 2.22.0 + 3.1.2 org.apache.maven.plugins @@ -127,7 +127,7 @@ org.codehaus.mojo properties-maven-plugin - 1.0.0 + 1.2.0 generate-resources @@ -186,7 +186,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.3.0 attach-sources @@ -199,7 +199,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.5.0 attach-javadocs @@ -212,7 +212,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.1.0 sign-artifacts diff --git a/src/main/java/io/mvnpm/esbuild/model/EsBuildConfig.java b/src/main/java/io/mvnpm/esbuild/model/EsBuildConfig.java index a28efd9..bcb90ca 100644 --- a/src/main/java/io/mvnpm/esbuild/model/EsBuildConfig.java +++ b/src/main/java/io/mvnpm/esbuild/model/EsBuildConfig.java @@ -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) { diff --git a/src/test/java/io/mvnpm/esbuild/model/EsBuildConfigTest.java b/src/test/java/io/mvnpm/esbuild/model/EsBuildConfigTest.java index 91c9944..1063b40 100644 --- a/src/test/java/io/mvnpm/esbuild/model/EsBuildConfigTest.java +++ b/src/test/java/io/mvnpm/esbuild/model/EsBuildConfigTest.java @@ -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