Skip to content

Commit

Permalink
feat: Added emoji status to scripts (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 authored Feb 19, 2025
1 parent 689f70c commit 58f835e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
20 changes: 16 additions & 4 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
import { $ } from "bun";
import { buildClientPackages } from "./misc/helpers";

console.log("✨ Build packages\n");

await buildClientPackages();

await $`bun run --filter="@superstreamer/api" build`;
await $`bun run --filter="@superstreamer/app" build`;
await $`bun run --filter="@superstreamer/artisan" build`;
await $`bun run --filter="@superstreamer/stitcher" build`;
console.log("\n✨ Build apps\n");

const apps = ["api", "app", "artisan", "stitcher"];

for (const app of apps) {
console.log(`👷 app [${app}] building`);
await $`bun run --filter="@superstreamer/${app}" build`;
console.log(`✅ app [${app}]`);
if (app !== apps[apps.length - 1]) {
console.log("");
}
}

console.log("\n🎉 all done!");
4 changes: 4 additions & 0 deletions scripts/dev.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { $ } from "bun";
import { buildClientPackages } from "./misc/helpers";

console.log("✨ Build packages\n");

await buildClientPackages();

console.log("\n✨ Starting dev\n");

await $`bun run --filter="@superstreamer/*" dev`;
15 changes: 9 additions & 6 deletions scripts/misc/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { $ } from "bun";
export async function buildClientPackages(options?: { exclude: string[] }) {
let packageNames = [
// Build player for app.
"@superstreamer/player",
"player",
];

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

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

0 comments on commit 58f835e

Please sign in to comment.