@docubook/create 1.4.6 → 1.4.8

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/create.js +14 -26
  2. package/package.json +1 -1
package/create.js CHANGED
@@ -43,7 +43,7 @@ function updatePostcssConfig(projectPath) {
43
43
  }
44
44
 
45
45
  program
46
- .version("1.4.6")
46
+ .version("1.4.8")
47
47
  .description("CLI to create a new Docubook project")
48
48
  .argument("[project-directory]", "Directory to create the new Docubook project")
49
49
  .action(async (projectDirectory) => {
@@ -63,42 +63,30 @@ program
63
63
  const emitter = degit(repo);
64
64
  const projectPath = path.resolve(process.cwd(), projectDirectory);
65
65
 
66
- const spinner = ora(`Cloning ${chalk.magenta("starter")}...`).start();
66
+ const spinner = ora(`Cloning ${chalk.green("starter")}...`).start();
67
67
  try {
68
68
  await emitter.clone(projectPath);
69
69
  spinner.succeed(`Docubook project successfully created in ${projectPath}!`);
70
70
 
71
71
  updatePostcssConfig(projectPath);
72
72
 
73
- let enterDirectory = true;
74
73
  const { enter } = await inquirer.prompt([
75
74
  {
76
75
  type: "confirm",
77
76
  name: "enter",
78
- message: "Enter the project directory to install dependencies?",
77
+ message: "Install dependencies in the current project directory?",
79
78
  default: true,
80
79
  },
81
80
  ]);
82
81
 
83
82
  if (enter) {
84
- const { directoryPath } = await inquirer.prompt([
85
- {
86
- type: "input",
87
- name: "directoryPath",
88
- message: "Enter the directory path to install dependencies:",
89
- default: projectPath,
90
- },
91
- ]);
92
-
93
- projectPath = directoryPath;
94
- }
95
-
96
- if (checkBunInstalled()) {
97
- console.log(chalk.green("\nBun detected. Installing dependencies with Bun..."));
98
- execSync("bun install", { cwd: projectPath, stdio: "inherit" });
99
- } else {
100
- console.log(chalk.yellow("\nBun not found. Using npm for installation..."));
101
- execSync("npm install", { cwd: projectPath, stdio: "inherit" });
83
+ if (checkBunInstalled()) {
84
+ console.log(chalk.green("\nBun detected. Installing dependencies with Bun..."));
85
+ execSync("bun install", { stdio: "inherit", cwd: projectPath });
86
+ } else {
87
+ console.log(chalk.green("\nInstalling dependencies with npm..."));
88
+ execSync("npm install", { stdio: "inherit", cwd: projectPath });
89
+ }
102
90
  }
103
91
 
104
92
  const packageJsonPath = path.join(projectPath, "package.json");
@@ -107,15 +95,15 @@ program
107
95
  console.log(chalk.green(`\nDocubook version: ${packageJson.version}\n`));
108
96
  }
109
97
 
110
- console.log(chalk.magenta("\nNext steps:"));
98
+ console.log(chalk.green("\nNext steps:"));
111
99
  console.log(`1. Navigate to your project directory:`);
112
- console.log(` ${chalk.magenta(`cd ${projectDirectory}`)}`);
100
+ console.log(` ${chalk.green(`cd ${projectDirectory}`)}`);
113
101
  console.log(`2. Start the development server:`);
114
102
 
115
103
  if (checkBunInstalled()) {
116
- console.log(` ${chalk.magenta("bun run dev")}`);
104
+ console.log(` ${chalk.green("bun run dev")}`);
117
105
  } else {
118
- console.log(` ${chalk.magenta("npm run dev")}`);
106
+ console.log(` ${chalk.green("npm run dev")}`);
119
107
  }
120
108
 
121
109
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/create",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {