@docubook/create 1.8.7 → 1.8.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.
- package/create.js +8 -2
- package/package.json +1 -1
package/create.js
CHANGED
|
@@ -113,7 +113,7 @@ function detectDefaultPackageManager() {
|
|
|
113
113
|
|
|
114
114
|
// ========== Entry CLI ========== //
|
|
115
115
|
program
|
|
116
|
-
.version("1.8.
|
|
116
|
+
.version("1.8.8")
|
|
117
117
|
.description("CLI to create a new Docubook project")
|
|
118
118
|
.argument("[project-directory]", "Directory to create the new Docubook project")
|
|
119
119
|
.action(async (projectDirectory) => {
|
|
@@ -209,6 +209,12 @@ program
|
|
|
209
209
|
console.log(chalk.white("When you install the package manager, the installation speed depends on the hardware you have."));
|
|
210
210
|
const installSpinner = ora(`Using ${packageManager}...`).start();
|
|
211
211
|
|
|
212
|
+
// Tambahkan konfigurasi khusus untuk yarn
|
|
213
|
+
if (packageManager === "yarn") {
|
|
214
|
+
const yarnrcPath = path.join(projectPath, ".yarnrc.yml");
|
|
215
|
+
fs.writeFileSync(yarnrcPath, "nodeLinker: node-modules\n");
|
|
216
|
+
}
|
|
217
|
+
|
|
212
218
|
try {
|
|
213
219
|
execSync(`${packageManager} install`, { cwd: projectPath, stdio: "ignore" });
|
|
214
220
|
installSpinner.succeed("Dependencies installed.");
|
|
@@ -216,7 +222,7 @@ program
|
|
|
216
222
|
installSpinner.fail("Failed to install dependencies.");
|
|
217
223
|
manualSteps(projectDirectory, packageManager); // Jika gagal install otomatis
|
|
218
224
|
process.exit(1);
|
|
219
|
-
|
|
225
|
+
}
|
|
220
226
|
|
|
221
227
|
await simulateInstallation();
|
|
222
228
|
|