@ardly/bunext 1.0.3 → 1.0.4
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/bin/cli.mjs +12 -1
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -34,12 +34,23 @@ if (!repoName || repoName.startsWith('--')) {
|
|
|
34
34
|
|
|
35
35
|
function initializeProject() {
|
|
36
36
|
const gitCheckout = `git clone --depth 1 https://github.com/DarkidOP/Bunext.git ${repoName}`
|
|
37
|
-
const installDeps = `cd ${repoName} && bun install`
|
|
38
37
|
const removeGit = `cd ${repoName} && rm -rf .git`
|
|
39
38
|
const initGit = `cd ${repoName} && git init && git add . && git commit -m "Initial commit"`
|
|
40
39
|
const openVSCode = `cd ${repoName} && code .`
|
|
41
40
|
const openCursor = `cd ${repoName} && cursor .`
|
|
42
41
|
|
|
42
|
+
// Determine package manager based on how script was executed
|
|
43
|
+
let packageManager = 'npm'
|
|
44
|
+
if (process.env.npm_execpath?.includes('pnpm')) {
|
|
45
|
+
packageManager = 'pnpm'
|
|
46
|
+
} else if (process.env.npm_execpath?.includes('yarn')) {
|
|
47
|
+
packageManager = 'yarn'
|
|
48
|
+
} else if (process.argv[1].includes('bunx')) {
|
|
49
|
+
packageManager = 'bun'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const installDeps = `cd ${repoName} && ${packageManager} install`
|
|
53
|
+
|
|
43
54
|
console.log(`Creating project template in ./${repoName}`)
|
|
44
55
|
const checkedOut = runCommand(gitCheckout)
|
|
45
56
|
if (!checkedOut) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ardly/bunext",
|
|
3
3
|
"description": "Bunext - A Next.js 15 template with Tailwind CSS, shadcn ui and Bun with some utilities built in",
|
|
4
4
|
"author": "Ard Astroid <ardastroid@gmail.com>",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.4",
|
|
6
6
|
"bin": "./bin/cli.mjs",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"next.js",
|