create-esa-stack 0.1.4 → 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 +19 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -688,6 +688,14 @@ async function main() {
688
688
  he("Operation cancelled.");
689
689
  process.exit(0);
690
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
+ }
691
699
  const s = _2();
692
700
  s.start("Scaffolding project...");
693
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`;
@@ -725,6 +733,17 @@ Setting up @next/third-parties...`);
725
733
  console.log("Installing @next/third-parties...");
726
734
  execSync("pnpm add @next/third-parties", { stdio: "inherit", cwd: projectPath });
727
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
+ }
728
747
  ge(`Successfully created ${projectName}!`);
729
748
  } catch (error) {
730
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.4",
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": {