io.mvnpm.esbuild.Watch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esbuild-java Show documentation
Show all versions of esbuild-java Show documentation
Small wrapper around esbuild to be able to use it in Java
The newest version!
package io.mvnpm.esbuild;
import java.io.Closeable;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import io.mvnpm.esbuild.model.EntryPoint;
import io.mvnpm.esbuild.model.WatchBuildResult;
import io.mvnpm.esbuild.model.WatchStartResult;
public class Watch implements Closeable {
private final WatchStartResult.WatchProcess process;
private final Path workDir;
private final Path dist;
private final WatchBuildResult firstBuildResult;
public Watch(WatchStartResult.WatchProcess process, Path workDir, Path dist, WatchBuildResult firstBuildResult) {
this.process = process;
this.workDir = workDir;
this.dist = dist;
this.firstBuildResult = firstBuildResult;
}
public void updateEntries(List entries) throws IOException {
entries.forEach(entry -> entry.process(workDir));
}
@Override
public void close() throws IOException {
process.close();
}
public Path workDir() {
return workDir;
}
public WatchBuildResult firstBuildResult() {
return firstBuildResult;
}
public boolean isAlive() {
return process.isAlive();
}
public Path dist() {
return dist;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy