create-esa-stack 0.1.4 → 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 +40 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -688,6 +688,22 @@ 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
|
+
}
|
|
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
|
+
}
|
|
691
707
|
const s = _2();
|
|
692
708
|
s.start("Scaffolding project...");
|
|
693
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`;
|
|
@@ -725,6 +741,30 @@ Setting up @next/third-parties...`);
|
|
|
725
741
|
console.log("Installing @next/third-parties...");
|
|
726
742
|
execSync("pnpm add @next/third-parties", { stdio: "inherit", cwd: projectPath });
|
|
727
743
|
}
|
|
744
|
+
if (installResend) {
|
|
745
|
+
console.log(`
|
|
746
|
+
Setting up Resend...`);
|
|
747
|
+
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
748
|
+
if (!hasNodeModules) {
|
|
749
|
+
console.log("Installing dependencies...");
|
|
750
|
+
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
751
|
+
}
|
|
752
|
+
console.log("Installing resend...");
|
|
753
|
+
execSync("pnpm add resend", { stdio: "inherit", cwd: projectPath });
|
|
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
|
+
}
|
|
728
768
|
ge(`Successfully created ${projectName}!`);
|
|
729
769
|
} catch (error) {
|
|
730
770
|
s.stop("Failed to scaffold project.");
|