]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: Command description for Bun
authorCcjr Yueys <ccjr@CcjrdeMacBook-Air.local>
Mon, 18 Mar 2024 11:07:09 +0000 (19:07 +0800)
committerCédric Exbrayat <cexbrayat@users.noreply.github.com>
Mon, 18 Mar 2024 14:11:19 +0000 (15:11 +0100)
index.ts

index 19bd910bee198325b59472039f1ce15c3518f3f4..611fec77dbcebef2c5e17f12371d9c69e731c353 100755 (executable)
--- a/index.ts
+++ b/index.ts
@@ -563,9 +563,15 @@ async function init() {
   }
 
   // Instructions:
-  // Supported package managers: pnpm > yarn > npm
+  // Supported package managers: pnpm > yarn > bun > npm
   const userAgent = process.env.npm_config_user_agent ?? ''
-  const packageManager = /pnpm/.test(userAgent) ? 'pnpm' : /yarn/.test(userAgent) ? 'yarn' : 'npm'
+  const packageManager = /pnpm/.test(userAgent)
+    ? 'pnpm'
+    : /yarn/.test(userAgent)
+      ? 'yarn'
+      : /bun/.test(userAgent)
+        ? 'bun'
+        : 'npm'
 
   // README generation
   fs.writeFileSync(