@project-ajax/create 0.0.37 → 0.0.38
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/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,6 +11,10 @@ import chalk from "chalk";
|
|
|
11
11
|
import ora from "ora";
|
|
12
12
|
var __filename = fileURLToPath(import.meta.url);
|
|
13
13
|
var __dirname = path.dirname(__filename);
|
|
14
|
+
function detectPackageManager() {
|
|
15
|
+
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
16
|
+
return userAgent.includes("bun/") ? "bun" : "npm";
|
|
17
|
+
}
|
|
14
18
|
async function runCreate() {
|
|
15
19
|
try {
|
|
16
20
|
await run();
|
|
@@ -111,7 +115,7 @@ Use --force to overwrite.`
|
|
|
111
115
|
default: true
|
|
112
116
|
});
|
|
113
117
|
}
|
|
114
|
-
const packageManager = values.bun ? "bun" :
|
|
118
|
+
const packageManager = values.bun ? "bun" : detectPackageManager();
|
|
115
119
|
let shouldInstall = false;
|
|
116
120
|
if (values.install) {
|
|
117
121
|
shouldInstall = true;
|