tthr 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -443,10 +443,20 @@ ${packageManager} is not installed on your system.`));
|
|
|
443
443
|
}
|
|
444
444
|
await fs3.remove(projectPath);
|
|
445
445
|
}
|
|
446
|
-
const spinner = ora2(
|
|
446
|
+
const spinner = ora2(`Scaffolding ${template} project...`).start();
|
|
447
447
|
let projectId;
|
|
448
448
|
let apiKey;
|
|
449
449
|
try {
|
|
450
|
+
if (template === "nuxt") {
|
|
451
|
+
await scaffoldNuxtProject(projectName, projectPath, spinner, packageManager);
|
|
452
|
+
} else if (template === "next") {
|
|
453
|
+
await scaffoldNextProject(projectName, projectPath, spinner, packageManager);
|
|
454
|
+
} else if (template === "sveltekit") {
|
|
455
|
+
await scaffoldSvelteKitProject(projectName, projectPath, spinner, packageManager);
|
|
456
|
+
} else {
|
|
457
|
+
await scaffoldVanillaProject(projectName, projectPath, spinner);
|
|
458
|
+
}
|
|
459
|
+
spinner.text = "Creating project on Tether...";
|
|
450
460
|
const response = await fetch(`${API_URL2}/projects`, {
|
|
451
461
|
method: "POST",
|
|
452
462
|
headers: {
|
|
@@ -462,16 +472,6 @@ ${packageManager} is not installed on your system.`));
|
|
|
462
472
|
const data = await response.json();
|
|
463
473
|
projectId = data.project.id;
|
|
464
474
|
apiKey = data.apiKey;
|
|
465
|
-
spinner.text = `Scaffolding ${template} project...`;
|
|
466
|
-
if (template === "nuxt") {
|
|
467
|
-
await scaffoldNuxtProject(projectName, projectPath, spinner, packageManager);
|
|
468
|
-
} else if (template === "next") {
|
|
469
|
-
await scaffoldNextProject(projectName, projectPath, spinner, packageManager);
|
|
470
|
-
} else if (template === "sveltekit") {
|
|
471
|
-
await scaffoldSvelteKitProject(projectName, projectPath, spinner, packageManager);
|
|
472
|
-
} else {
|
|
473
|
-
await scaffoldVanillaProject(projectName, projectPath, spinner);
|
|
474
|
-
}
|
|
475
475
|
spinner.text = "Adding Tether configuration...";
|
|
476
476
|
await addTetherFiles(projectPath, projectId, apiKey, template);
|
|
477
477
|
spinner.text = "Configuring framework integration...";
|
|
@@ -521,7 +521,7 @@ async function scaffoldNuxtProject(projectName, projectPath, spinner, packageMan
|
|
|
521
521
|
spinner.stop();
|
|
522
522
|
console.log(chalk3.dim("\nRunning nuxi init...\n"));
|
|
523
523
|
try {
|
|
524
|
-
execSync(`${runner} nuxi@latest init ${projectName}
|
|
524
|
+
execSync(`${runner} nuxi@latest init ${projectName} -t minimal --packageManager ${packageManager} --gitInit false`, {
|
|
525
525
|
cwd: parentDir,
|
|
526
526
|
stdio: "inherit"
|
|
527
527
|
});
|