create-esa-stack 0.1.7 → 0.1.8
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/cli.js +20 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -712,9 +712,17 @@ async function main() {
|
|
|
712
712
|
he("Operation cancelled.");
|
|
713
713
|
process.exit(0);
|
|
714
714
|
}
|
|
715
|
+
const installTesting = await ce({
|
|
716
|
+
message: "Do you want to install Testing tools (Vitest + React Testing Library)?",
|
|
717
|
+
initialValue: true
|
|
718
|
+
});
|
|
719
|
+
if (typeof installTesting === "symbol") {
|
|
720
|
+
he("Operation cancelled.");
|
|
721
|
+
process.exit(0);
|
|
722
|
+
}
|
|
715
723
|
const s = _2();
|
|
716
724
|
s.start("Scaffolding project...");
|
|
717
|
-
const command = `
|
|
725
|
+
const command = `pnpm create next-app@latest ${projectName} --biome --ts --tailwind --react-compiler --app --src-dir --import-alias "@/*" --use-pnpm --turbopack --skip-install --yes`;
|
|
718
726
|
try {
|
|
719
727
|
s.stop("Starting scaffolding...");
|
|
720
728
|
execSync(command, { stdio: "inherit" });
|
|
@@ -786,6 +794,17 @@ Setting up Supabase...`);
|
|
|
786
794
|
console.log("Installing supabase CLI...");
|
|
787
795
|
execSync("pnpm add supabase -D -E", { stdio: "inherit", cwd: projectPath });
|
|
788
796
|
}
|
|
797
|
+
if (installTesting) {
|
|
798
|
+
console.log(`
|
|
799
|
+
Setting up Testing tools...`);
|
|
800
|
+
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
801
|
+
if (!hasNodeModules) {
|
|
802
|
+
console.log("Installing dependencies...");
|
|
803
|
+
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
804
|
+
}
|
|
805
|
+
console.log("Installing Vitest, React Testing Library, and related tools...");
|
|
806
|
+
execSync("pnpm add vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom vite-tsconfig-paths -D -E", { stdio: "inherit", cwd: projectPath });
|
|
807
|
+
}
|
|
789
808
|
ge(`Successfully created ${projectName}!`);
|
|
790
809
|
} catch (error) {
|
|
791
810
|
s.stop("Failed to scaffold project.");
|