chore: compile, remove debug log

This commit is contained in:
2026-06-11 16:28:54 +02:00
parent 041d5a4934
commit 65f2efd879
2 changed files with 6 additions and 3 deletions
+6 -1
View File
@@ -4,6 +4,7 @@ import path from "path";
import { execSync } from "child_process";
import { fileURLToPath } from "url";
import { input, select } from "@inquirer/prompts";
const runnerPath = process.argv0;
const projectTypes = [
{
name: "blank",
@@ -52,7 +53,11 @@ async function main() {
console.error("❌ Directory already exists");
process.exit(1);
}
const buildThemeScript = path.resolve(__dirname, `../scripts/build-theme.ts`);
fs.cpSync(templateDir, targetDir, { recursive: true });
fs.cpSync(buildThemeScript, path.join(targetDir, "build-theme.ts"), {
recursive: true,
});
const pkgPath = path.join(targetDir, "package.json");
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
pkg.name = projectName;
@@ -62,7 +67,7 @@ async function main() {
theme.name = projectName;
fs.writeFileSync(themePath, JSON.stringify(theme, null, 2));
console.log("📦 Installing dependencies...");
execSync("npm install", { cwd: targetDir, stdio: "inherit" });
execSync(`${runnerPath} install`, { cwd: targetDir, stdio: "inherit" });
console.log(`\n✅ Theme created!\n`);
}
main().catch((err) => {