@guchen_0521/create-temp 0.1.4 → 0.1.5
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/lib/scaffold.js +12 -2
- package/package.json +1 -1
package/lib/scaffold.js
CHANGED
|
@@ -228,9 +228,19 @@ export async function scaffold({ templateKey, targetDir }) {
|
|
|
228
228
|
await rm(tempDir, { recursive: true, force: true });
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
const userAgent = process.env.npm_config_user_agent || "";
|
|
232
|
+
let packageManager = "npm";
|
|
233
|
+
if (userAgent.includes("pnpm")) {
|
|
234
|
+
packageManager = "pnpm";
|
|
235
|
+
} else if (userAgent.includes("yarn")) {
|
|
236
|
+
packageManager = "yarn";
|
|
237
|
+
} else if (userAgent.includes("bun")) {
|
|
238
|
+
packageManager = "bun";
|
|
239
|
+
}
|
|
240
|
+
|
|
231
241
|
console.log(`Created project in ${targetPath}`);
|
|
232
242
|
console.log("Next steps:");
|
|
233
243
|
console.log(` cd ${resolvedTargetDir}`);
|
|
234
|
-
console.log(
|
|
235
|
-
console.log(
|
|
244
|
+
console.log(` ${packageManager} install`);
|
|
245
|
+
console.log(` ${packageManager} run dev`);
|
|
236
246
|
}
|