create-react-docs-ui 0.6.2 → 0.6.3

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/index.js CHANGED
@@ -48,6 +48,15 @@ function toValidPackageName(projectName) {
48
48
  .replace(/[^a-z\d\-~]+/g, '-')
49
49
  }
50
50
 
51
+ function getPackageManager() {
52
+ const userAgent = process.env.npm_config_user_agent || ''
53
+
54
+ if (userAgent.includes('pnpm')) return 'pnpm'
55
+ if (userAgent.includes('yarn')) return 'yarn'
56
+ if (userAgent.includes('bun')) return 'bun'
57
+ return 'npm'
58
+ }
59
+
51
60
  function findLocalReactLib() {
52
61
  // Try to locate the built library in the monorepo for convenience
53
62
  const repoRoot = path.resolve(__dirname, '..')
@@ -115,11 +124,14 @@ async function init() {
115
124
 
116
125
  write('package.json', JSON.stringify(pkg, null, 2) + '\n')
117
126
 
127
+ const pm = getPackageManager()
128
+ const runCmd = pm === 'npm' ? 'npm run' : pm
129
+
118
130
  console.log(`\nāœ… Done! Created ${projectName} at ${root}`)
119
131
  console.log('\nšŸ“š Get started with:')
120
132
  console.log(`\n cd ${targetDir}`)
121
- console.log(' npm install')
122
- console.log(' npm run dev')
133
+ console.log(` ${pm} install`)
134
+ console.log(` ${runCmd} dev`)
123
135
  console.log('\nšŸŽ‰ Your React Docs UI project is ready!')
124
136
  }
125
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-react-docs-ui",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "react": "^19.0.0",
13
- "react-docs-ui": "^0.6.2",
13
+ "react-docs-ui": "^0.6.3",
14
14
  "react-dom": "^19.0.0",
15
15
  "react-router-dom": "^7.8.0"
16
16
  },