@docubook/create 1.4.6 → 1.4.7
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/create.js +9 -21
- 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.
|
|
46
|
+
.version("1.4.7")
|
|
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,35 +70,23 @@ program
|
|
|
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: "
|
|
77
|
+
message: "Install dependencies in the current project directory?",
|
|
79
78
|
default: true,
|
|
80
79
|
},
|
|
81
80
|
]);
|
|
82
81
|
|
|
83
82
|
if (enter) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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");
|