create-esa-stack 0.1.5 → 0.1.6
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 +21 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -696,6 +696,14 @@ 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
|
+
}
|
|
699
707
|
const s = _2();
|
|
700
708
|
s.start("Scaffolding project...");
|
|
701
709
|
const command = `npx create-next-app@latest ${projectName} --biome --ts --tailwind --react-compiler --app --src-dir --import-alias "@/*" --use-pnpm --turbopack --skip-install --yes`;
|
|
@@ -744,6 +752,19 @@ Setting up Resend...`);
|
|
|
744
752
|
console.log("Installing resend...");
|
|
745
753
|
execSync("pnpm add resend", { stdio: "inherit", cwd: projectPath });
|
|
746
754
|
}
|
|
755
|
+
if (installReactEmail) {
|
|
756
|
+
console.log(`
|
|
757
|
+
Setting up React Email...`);
|
|
758
|
+
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
759
|
+
if (!hasNodeModules) {
|
|
760
|
+
console.log("Installing dependencies...");
|
|
761
|
+
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
762
|
+
}
|
|
763
|
+
console.log("Installing react-email and @react-email/preview-server...");
|
|
764
|
+
execSync("pnpm add react-email @react-email/preview-server -D -E", { stdio: "inherit", cwd: projectPath });
|
|
765
|
+
console.log("Installing @react-email/components...");
|
|
766
|
+
execSync("pnpm add @react-email/components -E", { stdio: "inherit", cwd: projectPath });
|
|
767
|
+
}
|
|
747
768
|
ge(`Successfully created ${projectName}!`);
|
|
748
769
|
} catch (error) {
|
|
749
770
|
s.stop("Failed to scaffold project.");
|