@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.
Files changed (2) hide show
  1. package/lib/scaffold.js +12 -2
  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(" npm install");
235
- console.log(" npm run dev");
244
+ console.log(` ${packageManager} install`);
245
+ console.log(` ${packageManager} run dev`);
236
246
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guchen_0521/create-temp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Project scaffolding CLI (templates pulled from GitHub)",
5
5
  "type": "module",
6
6
  "bin": {