-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from ia3andy/prep-for-live-reload
Make the watch process more consistant in case of errors
- Loading branch information
Showing
7 changed files
with
139 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package io.mvnpm.esbuild; | ||
|
||
import java.util.Optional; | ||
import io.mvnpm.esbuild.model.WatchBuildResult; | ||
|
||
public interface BuildEventListener { | ||
|
||
void onBuild(Optional<BundleException> error); | ||
void onBuild(WatchBuildResult result); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/io/mvnpm/esbuild/model/WatchBuildResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.mvnpm.esbuild.model; | ||
|
||
import io.mvnpm.esbuild.BundleException; | ||
|
||
public record WatchBuildResult(String output, BundleException bundleException) { | ||
public WatchBuildResult(String output) { | ||
this(output, null); | ||
} | ||
|
||
public boolean isSuccess() { | ||
return bundleException == null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.mvnpm.esbuild.model; | ||
|
||
public record WatchStartResult(WatchBuildResult firstBuildResult, Process process) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters