create-nextspark-app 0.1.0-beta.136 → 0.1.0-beta.138

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/index.js +25 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46,6 +46,11 @@ async function createProject(options) {
46
46
  const dirSpinner = ora(" Creating project directory...").start();
47
47
  await fs.ensureDir(projectPath);
48
48
  dirSpinner.succeed(" Project directory created");
49
+ await fs.writeFile(
50
+ path.join(projectPath, ".npmrc"),
51
+ `shamefully-hoist=true
52
+ `
53
+ );
49
54
  const pkgSpinner = ora(" Initializing package.json...").start();
50
55
  const packageJson = {
51
56
  name: projectName,
@@ -60,24 +65,39 @@ async function createProject(options) {
60
65
  };
61
66
  await fs.writeJson(path.join(projectPath, "package.json"), packageJson, { spaces: 2 });
62
67
  pkgSpinner.succeed(" package.json created");
63
- const cliSpinner = ora(" Installing @nextsparkjs/core and @nextsparkjs/cli...").start();
68
+ const cliSpinner = ora(" Installing @nextsparkjs/core, @nextsparkjs/cli, and dependencies...").start();
64
69
  try {
65
70
  const localCoreTarball = findLocalTarball("@nextsparkjs/core");
66
71
  const localCliTarball = findLocalTarball("@nextsparkjs/cli");
72
+ const localUiTarball = findLocalTarball("@nextsparkjs/ui");
67
73
  let corePackage = "@nextsparkjs/core";
68
74
  let cliPackage = "@nextsparkjs/cli";
75
+ let uiPackage = "@nextsparkjs/ui";
69
76
  if (localCoreTarball && localCliTarball) {
70
77
  corePackage = localCoreTarball;
71
78
  cliPackage = localCliTarball;
72
- cliSpinner.text = " Installing @nextsparkjs/core and @nextsparkjs/cli from local tarballs...";
79
+ if (localUiTarball) uiPackage = localUiTarball;
80
+ cliSpinner.text = " Installing from local tarballs...";
73
81
  }
74
- execSync(`pnpm add ${corePackage} ${cliPackage}`, {
82
+ const essentialDeps = [
83
+ corePackage,
84
+ cliPackage,
85
+ uiPackage,
86
+ "next",
87
+ "react",
88
+ "react-dom",
89
+ "next-intl",
90
+ "better-auth",
91
+ "@better-fetch/fetch",
92
+ "jiti"
93
+ ].join(" ");
94
+ execSync(`pnpm add ${essentialDeps}`, {
75
95
  cwd: projectPath,
76
96
  stdio: "pipe"
77
97
  });
78
- cliSpinner.succeed(" @nextsparkjs/core and @nextsparkjs/cli installed");
98
+ cliSpinner.succeed(" @nextsparkjs/core, @nextsparkjs/cli, and dependencies installed");
79
99
  } catch (error) {
80
- cliSpinner.fail(" Failed to install @nextsparkjs/core and @nextsparkjs/cli");
100
+ cliSpinner.fail(" Failed to install dependencies");
81
101
  throw error;
82
102
  }
83
103
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextspark-app",
3
- "version": "0.1.0-beta.136",
3
+ "version": "0.1.0-beta.138",
4
4
  "description": "Create a new NextSpark SaaS project",
5
5
  "type": "module",
6
6
  "bin": {