create-esa-stack 0.1.3 → 0.1.4
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 +20 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -680,6 +680,14 @@ 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
|
+
}
|
|
683
691
|
const s = _2();
|
|
684
692
|
s.start("Scaffolding project...");
|
|
685
693
|
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 +707,24 @@ Setting up shadcn/ui...`);
|
|
|
699
707
|
console.log(`
|
|
700
708
|
Setting up TanStack Query...`);
|
|
701
709
|
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
702
|
-
if (!
|
|
710
|
+
if (!hasNodeModules) {
|
|
703
711
|
console.log("Installing dependencies...");
|
|
704
712
|
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
705
713
|
}
|
|
706
714
|
console.log("Installing @tanstack/react-query...");
|
|
707
715
|
execSync("pnpm add @tanstack/react-query", { stdio: "inherit", cwd: projectPath });
|
|
708
716
|
}
|
|
717
|
+
if (installNextThirdParties) {
|
|
718
|
+
console.log(`
|
|
719
|
+
Setting up @next/third-parties...`);
|
|
720
|
+
const hasNodeModules = existsSync(join(projectPath, "node_modules"));
|
|
721
|
+
if (!hasNodeModules) {
|
|
722
|
+
console.log("Installing dependencies...");
|
|
723
|
+
execSync("pnpm install", { stdio: "inherit", cwd: projectPath });
|
|
724
|
+
}
|
|
725
|
+
console.log("Installing @next/third-parties...");
|
|
726
|
+
execSync("pnpm add @next/third-parties", { stdio: "inherit", cwd: projectPath });
|
|
727
|
+
}
|
|
709
728
|
ge(`Successfully created ${projectName}!`);
|
|
710
729
|
} catch (error) {
|
|
711
730
|
s.stop("Failed to scaffold project.");
|