create-esa-stack 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +22 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -704,6 +704,14 @@ 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
+ }
707
715
  const s = _2();
708
716
  s.start("Scaffolding project...");
709
717
  const command = `npx create-next-app@latest ${projectName} --biome --ts --tailwind --react-compiler --app --src-dir --import-alias "@/*" --use-pnpm --turbopack --skip-install --yes`;
@@ -717,7 +725,7 @@ Setting up shadcn/ui...`);
717
725
  console.log("Installing dependencies...");
718
726
  execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
719
727
  console.log("Initializing shadcn/ui...");
720
- execSync("npx shadcn@latest init", { stdio: "inherit", cwd: projectPath });
728
+ execSync("pnpm dlx shadcn@latest init", { stdio: "inherit", cwd: projectPath });
721
729
  }
722
730
  if (installTanstackQuery) {
723
731
  console.log(`
@@ -765,6 +773,19 @@ Setting up React Email...`);
765
773
  console.log("Installing @react-email/components...");
766
774
  execSync("pnpm add @react-email/components -E", { stdio: "inherit", cwd: projectPath });
767
775
  }
776
+ if (installSupabase) {
777
+ console.log(`
778
+ Setting up Supabase...`);
779
+ const hasNodeModules = existsSync(join(projectPath, "node_modules"));
780
+ if (!hasNodeModules) {
781
+ console.log("Installing dependencies...");
782
+ execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
783
+ }
784
+ console.log("Installing @supabase/supabase-js and @supabase/ssr...");
785
+ execSync("pnpm add @supabase/supabase-js @supabase/ssr -E", { stdio: "inherit", cwd: projectPath });
786
+ console.log("Installing supabase CLI...");
787
+ execSync("pnpm add supabase -D -E", { stdio: "inherit", cwd: projectPath });
788
+ }
768
789
  ge(`Successfully created ${projectName}!`);
769
790
  } catch (error) {
770
791
  s.stop("Failed to scaffold project.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-esa-stack",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "CLI tool to scaffold Next.js projects with ESA's preferred tech stack",
5
5
  "type": "module",
6
6
  "bin": {