@docubook/create 1.4.8 → 1.4.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 +17 -12
- package/package.json +1 -1
package/create.js
CHANGED
|
@@ -43,20 +43,20 @@ function updatePostcssConfig(projectPath) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
program
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
.version("1.4.9")
|
|
47
|
+
.description("CLI to create a new Docubook project")
|
|
48
|
+
.argument("[project-directory]", "Directory to create the new Docubook project")
|
|
49
|
+
.action(async (projectDirectory) => {
|
|
50
50
|
if (!projectDirectory) {
|
|
51
|
-
|
|
51
|
+
const { directoryName } = await inquirer.prompt([
|
|
52
52
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
type: "input",
|
|
54
|
+
name: "directoryName",
|
|
55
|
+
message: "Enter a name for your project directory:",
|
|
56
|
+
default: "docubook",
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
]);
|
|
59
|
+
projectDirectory = directoryName;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const repo = "github:mywildancloud/docubook#starter";
|
|
@@ -68,7 +68,12 @@ program
|
|
|
68
68
|
await emitter.clone(projectPath);
|
|
69
69
|
spinner.succeed(`Docubook project successfully created in ${projectPath}!`);
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
// Jalankan rename hanya jika Bun terdeteksi
|
|
72
|
+
if (checkBunInstalled()) {
|
|
73
|
+
updatePostcssConfig(projectPath);
|
|
74
|
+
} else {
|
|
75
|
+
console.log(chalk.yellow("Skipping postcss.config.js rename because Bun is not installed."));
|
|
76
|
+
}
|
|
72
77
|
|
|
73
78
|
const { enter } = await inquirer.prompt([
|
|
74
79
|
{
|