Skip to content

Commit 58f835e

Browse files
authored
feat: Added emoji status to scripts (#165)
1 parent 689f70c commit 58f835e

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

scripts/build.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
import { $ } from "bun";
22
import { buildClientPackages } from "./misc/helpers";
33

4+
console.log("✨ Build packages\n");
5+
46
await buildClientPackages();
57

6-
await $`bun run --filter="@superstreamer/api" build`;
7-
await $`bun run --filter="@superstreamer/app" build`;
8-
await $`bun run --filter="@superstreamer/artisan" build`;
9-
await $`bun run --filter="@superstreamer/stitcher" build`;
8+
console.log("\n✨ Build apps\n");
9+
10+
const apps = ["api", "app", "artisan", "stitcher"];
11+
12+
for (const app of apps) {
13+
console.log(`👷 app [${app}] building`);
14+
await $`bun run --filter="@superstreamer/${app}" build`;
15+
console.log(`✅ app [${app}]`);
16+
if (app !== apps[apps.length - 1]) {
17+
console.log("");
18+
}
19+
}
20+
21+
console.log("\n🎉 all done!");

scripts/dev.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { $ } from "bun";
22
import { buildClientPackages } from "./misc/helpers";
33

4+
console.log("✨ Build packages\n");
5+
46
await buildClientPackages();
57

8+
console.log("\n✨ Starting dev\n");
9+
610
await $`bun run --filter="@superstreamer/*" dev`;

scripts/misc/helpers.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { $ } from "bun";
33
export async function buildClientPackages(options?: { exclude: string[] }) {
44
let packageNames = [
55
// Build player for app.
6-
"@superstreamer/player",
6+
"player",
77
];
88

99
if (options?.exclude) {
@@ -12,9 +12,12 @@ export async function buildClientPackages(options?: { exclude: string[] }) {
1212
);
1313
}
1414

15-
await Promise.all(
16-
packageNames.map((name) => {
17-
return $`bun run --filter="${name}" build`;
18-
}),
19-
);
15+
for (const packageName of packageNames) {
16+
console.log(`👷 package [${packageName}] building`);
17+
await $`bun run --filter="@superstreamer/${packageName}" build`;
18+
console.log(`✅ package [${packageName}]`);
19+
if (packageName !== packageNames[packageNames.length - 1]) {
20+
console.log("");
21+
}
22+
}
2023
}

0 commit comments

Comments
 (0)