create-esa-stack 0.1.5 → 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 +43 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -696,6 +696,22 @@ async function main() {
696
696
  he("Operation cancelled.");
697
697
  process.exit(0);
698
698
  }
699
+ const installReactEmail = await ce({
700
+ message: "Do you want to install React Email?",
701
+ initialValue: false
702
+ });
703
+ if (typeof installReactEmail === "symbol") {
704
+ he("Operation cancelled.");
705
+ process.exit(0);
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
+ }
699
715
  const s = _2();
700
716
  s.start("Scaffolding project...");
701
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`;
@@ -709,7 +725,7 @@ Setting up shadcn/ui...`);
709
725
  console.log("Installing dependencies...");
710
726
  execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
711
727
  console.log("Initializing shadcn/ui...");
712
- execSync("npx shadcn@latest init", { stdio: "inherit", cwd: projectPath });
728
+ execSync("pnpm dlx shadcn@latest init", { stdio: "inherit", cwd: projectPath });
713
729
  }
714
730
  if (installTanstackQuery) {
715
731
  console.log(`
@@ -744,6 +760,32 @@ Setting up Resend...`);
744
760
  console.log("Installing resend...");
745
761
  execSync("pnpm add resend", { stdio: "inherit", cwd: projectPath });
746
762
  }
763
+ if (installReactEmail) {
764
+ console.log(`
765
+ Setting up React Email...`);
766
+ const hasNodeModules = existsSync(join(projectPath, "node_modules"));
767
+ if (!hasNodeModules) {
768
+ console.log("Installing dependencies...");
769
+ execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
770
+ }
771
+ console.log("Installing react-email and @react-email/preview-server...");
772
+ execSync("pnpm add react-email @react-email/preview-server -D -E", { stdio: "inherit", cwd: projectPath });
773
+ console.log("Installing @react-email/components...");
774
+ execSync("pnpm add @react-email/components -E", { stdio: "inherit", cwd: projectPath });
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
+ }
747
789
  ge(`Successfully created ${projectName}!`);
748
790
  } catch (error) {
749
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.5",
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": {