chore: compile, remove debug log
This commit is contained in:
Vendored
+6
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user