@docubook/create 1.4.3 → 1.4.5

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 +24 -3
  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.3")
46
+ .version("1.4.5")
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) => {
@@ -70,7 +70,28 @@ program
70
70
 
71
71
  updatePostcssConfig(projectPath);
72
72
 
73
- process.chdir(projectPath);
73
+ const { enterDirectory } = await inquirer.prompt([
74
+ {
75
+ type: "confirm",
76
+ name: "enterDirectory",
77
+ message: "Enter the project directory to install dependencies?",
78
+ default: true,
79
+ },
80
+ ]);
81
+
82
+ if (enterDirectory) {
83
+ const { directoryPath } = await inquirer.prompt([
84
+ {
85
+ type: "input",
86
+ name: "directoryPath",
87
+ message: "Enter the directory path to install dependencies:",
88
+ default: projectPath,
89
+ },
90
+ ]);
91
+
92
+ projectPath = directoryPath;
93
+ }
94
+
74
95
  if (checkBunInstalled()) {
75
96
  console.log(chalk.green("\nBun detected. Installing dependencies with Bun..."));
76
97
  execSync("bun install", { cwd: projectPath, stdio: "inherit" });
@@ -87,7 +108,7 @@ program
87
108
 
88
109
  console.log(chalk.magenta("\nNext steps:"));
89
110
  console.log(`1. Navigate to your project directory:`);
90
- console.log(` cd ${projectDirectory}`);
111
+ console.log(` ${chalk.magenta(`cd ${projectDirectory}`)}`);
91
112
  console.log(`2. Start the development server:`);
92
113
 
93
114
  if (checkBunInstalled()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/create",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {