create-esa-stack 0.1.6 → 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 +42 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -704,9 +704,25 @@ async function main() {
|
|
|
704
704
|
he("Operation cancelled.");
|
|
705
705
|
process.exit(0);
|
|
706
706
|
}
|
|
707
|
+
const installSupabase = await ce({
|
|
708
|
+
message: "Do you want to install Supabase?",
|
|
709
|
+
initialValue: true
|
|
710
|
+
});
|
|
711
|
+
if (typeof installSupabase === "symbol") {
|
|
712
|
+
he("Operation cancelled.");
|
|
713
|
+
process.exit(0);
|
|
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
|
+
}
|
|
707
723
|
const s = _2();
|
|
708
724
|
s.start("Scaffolding project...");
|
|
709
|
-
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`;
|
|
710
726
|
try {
|
|
711
727
|
s.stop("Starting scaffolding...");
|
|
712
728
|
execSync(command, { stdio: "inherit" });
|
|
@@ -717,7 +733,7 @@ Setting up shadcn/ui...`);
|
|
|
717
733
|
console.log("Installing dependencies...");
|
|
718
734
|
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
719
735
|
console.log("Initializing shadcn/ui...");
|
|
720
|
-
execSync("
|
|
736
|
+
execSync("pnpm dlx shadcn@latest init", { stdio: "inherit", cwd: projectPath });
|
|
721
737
|
}
|
|
722
738
|
if (installTanstackQuery) {
|
|
723
739
|
console.log(`
|
|
@@ -765,6 +781,30 @@ Setting up React Email...`);
|
|
|
765
781
|
console.log("Installing @react-email/components...");
|
|
766
782
|
execSync("pnpm add @react-email/components -E", { stdio: "inherit", cwd: projectPath });
|
|
767
783
|
}
|
|
784
|
+
if (installSupabase) {
|
|
785
|
+
console.log(`
|
|
786
|
+
Setting up Supabase...`);
|
|
787
|
+
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
788
|
+
if (!hasNodeModules) {
|
|
789
|
+
console.log("Installing dependencies...");
|
|
790
|
+
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
791
|
+
}
|
|
792
|
+
console.log("Installing @supabase/supabase-js and @supabase/ssr...");
|
|
793
|
+
execSync("pnpm add @supabase/supabase-js @supabase/ssr -E", { stdio: "inherit", cwd: projectPath });
|
|
794
|
+
console.log("Installing supabase CLI...");
|
|
795
|
+
execSync("pnpm add supabase -D -E", { stdio: "inherit", cwd: projectPath });
|
|
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
|
+
}
|
|
768
808
|
ge(`Successfully created ${projectName}!`);
|
|
769
809
|
} catch (error) {
|
|
770
810
|
s.stop("Failed to scaffold project.");
|