create-esa-stack 0.1.3 → 0.1.5

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 +39 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -680,6 +680,22 @@ async function main() {
680
680
  he("Operation cancelled.");
681
681
  process.exit(0);
682
682
  }
683
+ const installNextThirdParties = await ce({
684
+ message: "Do you want to install @next/third-parties?",
685
+ initialValue: true
686
+ });
687
+ if (typeof installNextThirdParties === "symbol") {
688
+ he("Operation cancelled.");
689
+ process.exit(0);
690
+ }
691
+ const installResend = await ce({
692
+ message: "Do you want to install Resend?",
693
+ initialValue: false
694
+ });
695
+ if (typeof installResend === "symbol") {
696
+ he("Operation cancelled.");
697
+ process.exit(0);
698
+ }
683
699
  const s = _2();
684
700
  s.start("Scaffolding project...");
685
701
  const command = `npx create-next-app@latest ${projectName} --biome --ts --tailwind --react-compiler --app --src-dir --import-alias "@/*" --use-pnpm --turbopack --skip-install --yes`;
@@ -699,13 +715,35 @@ Setting up shadcn/ui...`);
699
715
  console.log(`
700
716
  Setting up TanStack Query...`);
701
717
  const hasNodeModules = existsSync(join(projectPath, "node_modules"));
702
- if (!installShadcn && !hasNodeModules) {
718
+ if (!hasNodeModules) {
703
719
  console.log("Installing dependencies...");
704
720
  execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
705
721
  }
706
722
  console.log("Installing @tanstack/react-query...");
707
723
  execSync("pnpm add @tanstack/react-query", { stdio: "inherit", cwd: projectPath });
708
724
  }
725
+ if (installNextThirdParties) {
726
+ console.log(`
727
+ Setting up @next/third-parties...`);
728
+ const hasNodeModules = existsSync(join(projectPath, "node_modules"));
729
+ if (!hasNodeModules) {
730
+ console.log("Installing dependencies...");
731
+ execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
732
+ }
733
+ console.log("Installing @next/third-parties...");
734
+ execSync("pnpm add @next/third-parties", { stdio: "inherit", cwd: projectPath });
735
+ }
736
+ if (installResend) {
737
+ console.log(`
738
+ Setting up Resend...`);
739
+ const hasNodeModules = existsSync(join(projectPath, "node_modules"));
740
+ if (!hasNodeModules) {
741
+ console.log("Installing dependencies...");
742
+ execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
743
+ }
744
+ console.log("Installing resend...");
745
+ execSync("pnpm add resend", { stdio: "inherit", cwd: projectPath });
746
+ }
709
747
  ge(`Successfully created ${projectName}!`);
710
748
  } catch (error) {
711
749
  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.3",
3
+ "version": "0.1.5",
4
4
  "description": "CLI tool to scaffold Next.js projects with ESA's preferred tech stack",
5
5
  "type": "module",
6
6
  "bin": {