create-nextspark-app 0.1.0-beta.2 → 0.1.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -32,15 +32,15 @@ async function createProject(options) {
32
32
  };
33
33
  await fs.writeJson(path.join(projectPath, "package.json"), packageJson, { spaces: 2 });
34
34
  pkgSpinner.succeed(" package.json created");
35
- const coreSpinner = ora(" Installing @nextsparkjs/core...").start();
35
+ const cliSpinner = ora(" Installing @nextsparkjs/cli...").start();
36
36
  try {
37
- execSync("pnpm add @nextsparkjs/core", {
37
+ execSync("pnpm add @nextsparkjs/cli", {
38
38
  cwd: projectPath,
39
39
  stdio: "pipe"
40
40
  });
41
- coreSpinner.succeed(" @nextsparkjs/core installed");
41
+ cliSpinner.succeed(" @nextsparkjs/cli installed");
42
42
  } catch (error) {
43
- coreSpinner.fail(" Failed to install @nextsparkjs/core");
43
+ cliSpinner.fail(" Failed to install @nextsparkjs/cli");
44
44
  throw error;
45
45
  }
46
46
  console.log();
@@ -52,13 +52,21 @@ async function createProject(options) {
52
52
  stdio: "inherit"
53
53
  // Interactive mode
54
54
  });
55
+ const installSpinner = ora(" Installing dependencies...").start();
56
+ try {
57
+ execSync("pnpm install", {
58
+ cwd: projectPath,
59
+ stdio: "pipe"
60
+ });
61
+ installSpinner.succeed(" Dependencies installed");
62
+ } catch (error) {
63
+ installSpinner.fail(" Failed to install dependencies");
64
+ throw error;
65
+ }
55
66
  console.log();
56
- console.log(chalk.bold.green(" Success!"));
57
- console.log();
58
- console.log(" Next steps:");
67
+ console.log(chalk.gray(` To start developing:`));
59
68
  console.log();
60
69
  console.log(chalk.cyan(` cd ${projectName}`));
61
- console.log(chalk.cyan(" pnpm dev"));
62
70
  console.log();
63
71
  }
64
72
 
@@ -121,7 +129,7 @@ async function getProjectOptions(projectName, skipPrompts) {
121
129
 
122
130
  // src/index.ts
123
131
  var program = new Command();
124
- program.name("create-nextspark-app").description("Create a new NextSpark SaaS project").version("0.1.0-beta.1").argument("[project-name]", "Name of the project").option("--preset <preset>", "Use a preset (saas, blog, crm)").option("-y, --yes", "Skip prompts and use defaults", false).action(async (projectName, options) => {
132
+ program.name("create-nextspark-app").description("Create a new NextSpark SaaS project").version("0.1.0-beta.4").argument("[project-name]", "Name of the project").option("--preset <preset>", "Use a preset (saas, blog, crm)").option("-y, --yes", "Skip prompts and use defaults", false).action(async (projectName, options) => {
125
133
  console.log();
126
134
  console.log(chalk2.bold.cyan(" NextSpark"));
127
135
  console.log(chalk2.dim(" Create a new SaaS project"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextspark-app",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "Create a new NextSpark SaaS project",
5
5
  "type": "module",
6
6
  "bin": {