Skip to content

Commit 3e865cf

Browse files
committed
build: Improve logging in build
1 parent 76f2d13 commit 3e865cf

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

scripts/build.ts

+16-10
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,19 @@ await build({
220220
useWasm: true,
221221
minify: !args["no-minify"],
222222
sourcemap: args.dev ?? false,
223-
}).andThrough(() => {
224-
if (args.dev) {
225-
return setupTestVault(
226-
outputFolder,
227-
"obsidian-github-stars",
228-
"./test-vault",
229-
);
230-
}
231-
return okAsync();
232-
});
223+
})
224+
.andThrough(() => {
225+
if (args.dev) {
226+
return setupTestVault(
227+
outputFolder,
228+
"obsidian-github-stars",
229+
"./test-vault",
230+
);
231+
}
232+
return okAsync();
233+
})
234+
.andTee(() => console.log("Done!"))
235+
.orElse((error) => {
236+
console.error(`Build failed. Reason: ${error}`);
237+
process.exit(1);
238+
});

0 commit comments

Comments
 (0)