Moved @tensamin/ui out of monorepo

This commit is contained in:
Alois 2026-04-12 00:08:15 +02:00
commit 39aa70a9a6
62 changed files with 309 additions and 3320 deletions

View file

@ -1,48 +0,0 @@
import { existsSync, readdirSync, statSync } from "fs";
import { join, relative } from "path";
import { execSync } from "child_process";
import { fileURLToPath } from "node:url";
import { dirname } from "node:path";
const _dirname = dirname(fileURLToPath(import.meta.url));
const rootDir = join(_dirname, "..");
const targetDirs = [join(rootDir, "packages"), join(rootDir, "apps")];
function getPackageDirs(dir: string): string[] {
const entries = readdirSync(dir);
const dirs: string[] = [];
for (const entry of entries) {
const fullPath = join(dir, entry);
if (!statSync(fullPath).isDirectory()) continue;
if (existsSync(join(fullPath, "package.json"))) {
dirs.push(fullPath);
continue;
}
dirs.push(...getPackageDirs(fullPath));
}
return dirs;
}
for (const targetDir of targetDirs) {
const packageDirs = getPackageDirs(targetDir);
for (const fullPath of packageDirs) {
const entry = relative(rootDir, fullPath);
console.log(`Installing ${entry}...`);
try {
execSync("bun install", { cwd: fullPath, stdio: "inherit" });
console.log(`${entry} intalled successfully.`);
} catch {
console.error(`Failed to install ${entry}.`);
process.exit(1);
}
}
}
console.log("Done!");