@docubook/create 1.8.7 → 1.8.9
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 -3
- package/package.json +1 -1
package/create.js
CHANGED
|
@@ -85,7 +85,6 @@ async function simulateInstallation() {
|
|
|
85
85
|
// ========== Jika user batal install, tunjukkan langkah manual ========== //
|
|
86
86
|
function manualSteps(projectDirectory, packageManager) {
|
|
87
87
|
const manualInstructions = `
|
|
88
|
-
You chose not to continue with the installation.
|
|
89
88
|
Please follow these steps manually to finish setting up your project:
|
|
90
89
|
|
|
91
90
|
1. ${chalk.cyan(`cd ${projectDirectory}`)}
|
|
@@ -113,7 +112,7 @@ function detectDefaultPackageManager() {
|
|
|
113
112
|
|
|
114
113
|
// ========== Entry CLI ========== //
|
|
115
114
|
program
|
|
116
|
-
.version("1.8.
|
|
115
|
+
.version("1.8.9")
|
|
117
116
|
.description("CLI to create a new Docubook project")
|
|
118
117
|
.argument("[project-directory]", "Directory to create the new Docubook project")
|
|
119
118
|
.action(async (projectDirectory) => {
|
|
@@ -209,6 +208,12 @@ program
|
|
|
209
208
|
console.log(chalk.white("When you install the package manager, the installation speed depends on the hardware you have."));
|
|
210
209
|
const installSpinner = ora(`Using ${packageManager}...`).start();
|
|
211
210
|
|
|
211
|
+
// Tambahkan konfigurasi khusus untuk yarn
|
|
212
|
+
if (packageManager === "yarn") {
|
|
213
|
+
const yarnrcPath = path.join(projectPath, ".yarnrc.yml");
|
|
214
|
+
fs.writeFileSync(yarnrcPath, "nodeLinker: node-modules\n");
|
|
215
|
+
}
|
|
216
|
+
|
|
212
217
|
try {
|
|
213
218
|
execSync(`${packageManager} install`, { cwd: projectPath, stdio: "ignore" });
|
|
214
219
|
installSpinner.succeed("Dependencies installed.");
|
|
@@ -216,7 +221,7 @@ program
|
|
|
216
221
|
installSpinner.fail("Failed to install dependencies.");
|
|
217
222
|
manualSteps(projectDirectory, packageManager); // Jika gagal install otomatis
|
|
218
223
|
process.exit(1);
|
|
219
|
-
|
|
224
|
+
}
|
|
220
225
|
|
|
221
226
|
await simulateInstallation();
|
|
222
227
|
|