@ardly/bunext 1.0.6 → 1.0.7

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 (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -16
  3. package/cli.mjs +126 -0
  4. package/package.json +14 -58
  5. package/.eslintrc.json +0 -8
  6. package/.prettierignore +0 -4
  7. package/STRUCTURE.md +0 -77
  8. package/bin/cli.mjs +0 -126
  9. package/components.json +0 -21
  10. package/next.config.ts +0 -22
  11. package/postcss.config.mjs +0 -8
  12. package/prettier.config.js +0 -7
  13. package/public/android-chrome-192x192.png +0 -0
  14. package/public/android-chrome-512x512.png +0 -0
  15. package/public/favicon.svg +0 -1
  16. package/public/loading-dots.gif +0 -0
  17. package/public/logo.svg +0 -1
  18. package/public/ogImage.webp +0 -0
  19. package/public/site.webmanifest +0 -19
  20. package/src/actions/placeholder.ts +0 -30
  21. package/src/actions/sampleAction.ts +0 -39
  22. package/src/app/(index)/intr/TestCard.tsx +0 -31
  23. package/src/app/(index)/intr/page.tsx +0 -17
  24. package/src/app/(index)/page.tsx +0 -156
  25. package/src/app/(index)/pagetr/page.tsx +0 -37
  26. package/src/app/error-wrapper.tsx +0 -32
  27. package/src/app/global-error.tsx +0 -53
  28. package/src/app/layout.tsx +0 -56
  29. package/src/app/loading.tsx +0 -11
  30. package/src/app/not-found.tsx +0 -45
  31. package/src/app/sitemap.ts +0 -14
  32. package/src/components/Providers/root-provider.tsx +0 -22
  33. package/src/components/Providers/theme-provider.tsx +0 -27
  34. package/src/components/TestComp.tsx +0 -11
  35. package/src/components/brand.tsx +0 -35
  36. package/src/components/navigation/footer.tsx +0 -32
  37. package/src/components/navigation/main-nav.tsx +0 -55
  38. package/src/components/navigation/mobile-nav.tsx +0 -154
  39. package/src/components/navigation/site-header.tsx +0 -67
  40. package/src/components/ui/avatar.tsx +0 -50
  41. package/src/components/ui/badge.tsx +0 -36
  42. package/src/components/ui/button.tsx +0 -56
  43. package/src/components/ui/card.tsx +0 -79
  44. package/src/components/ui/command.tsx +0 -153
  45. package/src/components/ui/dialog.tsx +0 -122
  46. package/src/components/ui/drawer.tsx +0 -118
  47. package/src/components/ui/dropdown-menu.tsx +0 -200
  48. package/src/components/ui/input.tsx +0 -22
  49. package/src/components/ui/label.tsx +0 -26
  50. package/src/components/ui/multi-select.tsx +0 -380
  51. package/src/components/ui/origin/multiselect.tsx +0 -645
  52. package/src/components/ui/popover.tsx +0 -31
  53. package/src/components/ui/radio-group.tsx +0 -44
  54. package/src/components/ui/separator.tsx +0 -31
  55. package/src/components/ui/skeleton.tsx +0 -15
  56. package/src/components/ui/themeSelector.tsx +0 -157
  57. package/src/components/ui/toast.tsx +0 -129
  58. package/src/components/ui/toaster.tsx +0 -31
  59. package/src/components/ui/tooltip.tsx +0 -39
  60. package/src/components/utils/ConditionalLink.tsx +0 -46
  61. package/src/components/utils/Image.tsx +0 -57
  62. package/src/components/utils/Img.tsx +0 -104
  63. package/src/components/utils/Spinner.tsx +0 -29
  64. package/src/components/utils/TopButton.tsx +0 -67
  65. package/src/components/utils/TransitionLink.tsx +0 -67
  66. package/src/components/utils/copy.tsx +0 -98
  67. package/src/components/utils/featureFlag.tsx +0 -22
  68. package/src/components/utils/icons.tsx +0 -155
  69. package/src/components/utils/share-modal.tsx +0 -159
  70. package/src/hooks/use-intersection.ts +0 -52
  71. package/src/hooks/use-lazy-load.ts +0 -33
  72. package/src/hooks/use-meta-color.ts +0 -25
  73. package/src/hooks/use-toast.ts +0 -191
  74. package/src/lib/config/featureflags.ts +0 -63
  75. package/src/lib/config/siteConfig.ts +0 -172
  76. package/src/lib/config/user.ts +0 -9
  77. package/src/lib/data/footer-data.ts +0 -85
  78. package/src/lib/data/nav-data.ts +0 -30
  79. package/src/lib/data/siteData.ts +0 -52
  80. package/src/lib/utils/index.ts +0 -190
  81. package/src/styles/customGlobal.css +0 -141
  82. package/src/styles/globals.css +0 -72
  83. package/src/styles/tailwind/base.ts +0 -46
  84. package/src/styles/tailwind/fonts/ClashDisplay-Bold.eot +0 -0
  85. package/src/styles/tailwind/fonts/ClashDisplay-Bold.ttf +0 -0
  86. package/src/styles/tailwind/fonts/ClashDisplay-Bold.woff +0 -0
  87. package/src/styles/tailwind/fonts/ClashDisplay-Bold.woff2 +0 -0
  88. package/src/styles/tailwind/fonts/ClashDisplay-Extralight.eot +0 -0
  89. package/src/styles/tailwind/fonts/ClashDisplay-Extralight.ttf +0 -0
  90. package/src/styles/tailwind/fonts/ClashDisplay-Extralight.woff +0 -0
  91. package/src/styles/tailwind/fonts/ClashDisplay-Extralight.woff2 +0 -0
  92. package/src/styles/tailwind/fonts/ClashDisplay-Light.eot +0 -0
  93. package/src/styles/tailwind/fonts/ClashDisplay-Light.ttf +0 -0
  94. package/src/styles/tailwind/fonts/ClashDisplay-Light.woff +0 -0
  95. package/src/styles/tailwind/fonts/ClashDisplay-Light.woff2 +0 -0
  96. package/src/styles/tailwind/fonts/ClashDisplay-Medium.eot +0 -0
  97. package/src/styles/tailwind/fonts/ClashDisplay-Medium.ttf +0 -0
  98. package/src/styles/tailwind/fonts/ClashDisplay-Medium.woff +0 -0
  99. package/src/styles/tailwind/fonts/ClashDisplay-Medium.woff2 +0 -0
  100. package/src/styles/tailwind/fonts/ClashDisplay-Regular.eot +0 -0
  101. package/src/styles/tailwind/fonts/ClashDisplay-Regular.ttf +0 -0
  102. package/src/styles/tailwind/fonts/ClashDisplay-Regular.woff +0 -0
  103. package/src/styles/tailwind/fonts/ClashDisplay-Regular.woff2 +0 -0
  104. package/src/styles/tailwind/fonts/ClashDisplay-Semibold.eot +0 -0
  105. package/src/styles/tailwind/fonts/ClashDisplay-Semibold.ttf +0 -0
  106. package/src/styles/tailwind/fonts/ClashDisplay-Semibold.woff +0 -0
  107. package/src/styles/tailwind/fonts/ClashDisplay-Semibold.woff2 +0 -0
  108. package/src/styles/tailwind/fonts/ClashDisplay-Variable.eot +0 -0
  109. package/src/styles/tailwind/fonts/ClashDisplay-Variable.ttf +0 -0
  110. package/src/styles/tailwind/fonts/ClashDisplay-Variable.woff +0 -0
  111. package/src/styles/tailwind/fonts/ClashDisplay-Variable.woff2 +0 -0
  112. package/src/styles/tailwind/fonts/GeistMonoVF.woff +0 -0
  113. package/src/styles/tailwind/fonts/GeistVF.woff +0 -0
  114. package/src/styles/tailwind/fonts.ts +0 -51
  115. package/src/styles/tailwind/tailwindUtils.ts +0 -29
  116. package/src/types/index.ts +0 -80
  117. package/tailwind.config.ts +0 -104
  118. package/tsconfig.json +0 -28
  119. package/vercel.json +0 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ard Astroid / Farhan Ashhab Nur
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # Bunext
2
2
 
3
3
  A Next.js 15 app with Tailwind CSS template. [Live deployment](https://bunext.ardastroid.com/)
4
+ Repo: [Github Repo](https://github.com/DarkidOP/Bunext)
5
+
6
+ ### to create a bootstrap project
7
+
8
+ ```bash
9
+ npx @darkid/create-bunext my-project
10
+ ```
11
+
12
+ you can specify `-vs` or `--cursor` flags to auto open the project in vscode or cursor respectively after installation.
4
13
 
5
14
  ## Usage (run locally)
6
15
 
@@ -46,7 +55,7 @@ npm run dev
46
55
  - [zod](https://zod.dev/) validation
47
56
  - Per Link page transition (without any library)
48
57
  - Custom Image components with lazy loading and auto generated placeholder (worsk with or without `next/image`)
49
- - [Biome](https://biomejs.dev/) for linting and formatting
58
+ - [Prettier](https://prettier.io/) for formatting with tailwind plugin configured
50
59
  - [Fluid Tailwind](https://fluid.tw/) for easier responsive design (disabled by default, to enable go to `tailwind.config.ts` and uncomment the fluid plugin variables, Note: the `min-*` and `max-*` variants don't work while using fluid-tailwind)
51
60
  - Utilities like `qrCode gen, string shortner, uniqueCode gen, img placeholder, email validation, hashing etc`
52
61
 
@@ -73,23 +82,23 @@ npm run dev
73
82
  ### Multi-select sample code
74
83
 
75
84
  ```tsx
76
- 'use client'
77
- import React, { useState } from 'react'
78
- import { MultiSelect } from '@/components/ui/multi-select'
85
+ "use client";
86
+ import React, { useState } from "react";
87
+ import { MultiSelect } from "@/components/ui/multi-select";
79
88
 
80
89
  const catsList = [
81
- { value: 'persian', label: 'Persian Cat' },
82
- { value: 'siamese', label: 'Siamese Cat' },
83
- { value: 'maine-coon', label: 'Maine Coon' },
84
- { value: 'ragdoll', label: 'Ragdoll' },
85
- { value: 'bengal', label: 'Bengal Cat' },
86
- ]
90
+ { value: "persian", label: "Persian Cat" },
91
+ { value: "siamese", label: "Siamese Cat" },
92
+ { value: "maine-coon", label: "Maine Coon" },
93
+ { value: "ragdoll", label: "Ragdoll" },
94
+ { value: "bengal", label: "Bengal Cat" },
95
+ ];
87
96
 
88
97
  function Home() {
89
98
  const [selectedCats, setSelectedCats] = useState<string[]>([
90
- 'persian',
91
- 'siamese',
92
- ])
99
+ "persian",
100
+ "siamese",
101
+ ]);
93
102
 
94
103
  return (
95
104
  <div className="max-w-xl p-4">
@@ -112,10 +121,18 @@ function Home() {
112
121
  </ul>
113
122
  </div>
114
123
  </div>
115
- )
124
+ );
116
125
  }
117
126
  ```
118
127
 
119
128
  <!-- ### [Conventions](./CONVENTION.md) -->
120
- <!-- ## License
121
- Licensed under the [MIT license](./LICENSE). -->
129
+
130
+ ## Socials
131
+
132
+ - Website: [ardastroid.com](https://ardastroid.com)
133
+ - Email: [hello@ardastroid.com](mailto:hello@ardastroid.com)
134
+ - GitHub: [@ardastroid](hhttps://github.com/DarkidOP)
135
+
136
+ ## License
137
+
138
+ Licensed under the [MIT license](./LICENSE).
package/cli.mjs ADDED
@@ -0,0 +1,126 @@
1
+ import { execSync } from "child_process";
2
+ import readline from "readline";
3
+
4
+ const runCommand = (command) => {
5
+ try {
6
+ execSync(`${command}`, { stdio: "inherit" });
7
+ } catch (error) {
8
+ console.error(`Failed to run command: ${command}`, error);
9
+ return false;
10
+ }
11
+ return true;
12
+ };
13
+
14
+ const rl = readline.createInterface({
15
+ input: process.stdin,
16
+ output: process.stdout,
17
+ });
18
+
19
+ let repoName = process.argv[2];
20
+ const args = process.argv.slice(2);
21
+ const useVSCode = args.includes("--vs");
22
+ const useCursor = args.includes("--cursor");
23
+
24
+ const validateRepoName = (name) => {
25
+ const validNameRegex = /^[a-z0-9-]+$/;
26
+ return validNameRegex.test(name);
27
+ };
28
+
29
+ const promptForValidRepoName = (callback) => {
30
+ rl.question(
31
+ "Please enter a name for your project (lowercase letters, numbers and hyphens only): ",
32
+ (answer) => {
33
+ if (validateRepoName(answer)) {
34
+ repoName = answer;
35
+ callback();
36
+ } else {
37
+ console.error(
38
+ "Invalid project name. Please use only lowercase letters, numbers and hyphens."
39
+ );
40
+ promptForValidRepoName(callback);
41
+ }
42
+ }
43
+ );
44
+ };
45
+
46
+ if (!repoName || repoName.startsWith("--")) {
47
+ promptForValidRepoName(initializeProject);
48
+ } else if (!validateRepoName(repoName)) {
49
+ console.error(
50
+ "Invalid project name. Please use only lowercase letters, numbers and hyphens."
51
+ );
52
+ promptForValidRepoName(initializeProject);
53
+ } else {
54
+ initializeProject();
55
+ }
56
+
57
+ function initializeProject() {
58
+ const gitCheckout = `git clone --depth 1 https://github.com/DarkidOP/Bunext.git ${repoName}`;
59
+ const removeGit = `cd ${repoName} && rm -rf .git`;
60
+ const initGit = `cd ${repoName} && git init && git add . && git commit -m "Initial commit"`;
61
+ const openVSCode = `cd ${repoName} && code .`;
62
+ const openCursor = `cd ${repoName} && cursor .`;
63
+
64
+ // Determine package manager based on how script was executed
65
+ let packageManager = "npm";
66
+ if (process.env.npm_execpath?.includes("pnpm")) {
67
+ packageManager = "pnpm";
68
+ } else if (process.env.npm_execpath?.includes("yarn")) {
69
+ packageManager = "yarn";
70
+ } else if (process.argv[1].includes("bunx")) {
71
+ packageManager = "bun";
72
+ }
73
+
74
+ const installDeps = `cd ${repoName} && ${packageManager}${
75
+ packageManager === "npm" ? " install --legacy-peer-deps" : " install"
76
+ }`;
77
+
78
+ console.log(`Creating project template in ./${repoName}`);
79
+ const checkedOut = runCommand(gitCheckout);
80
+ if (!checkedOut) {
81
+ console.error(
82
+ 'Failed to clone template repository "https://github.com/DarkidOP/Bunext.git"'
83
+ );
84
+ process.exit(1);
85
+ }
86
+
87
+ console.log("Removing Git history...");
88
+ const removedGit = runCommand(removeGit);
89
+ if (!removedGit) {
90
+ console.error("Failed to remove Git history");
91
+ process.exit(1);
92
+ }
93
+
94
+ console.log("Installing dependencies...");
95
+ const installedDeps = runCommand(installDeps);
96
+ if (!installedDeps) {
97
+ console.error("Failed to install dependencies");
98
+ process.exit(1);
99
+ }
100
+
101
+ rl.question(
102
+ "Would you like to initialize a new git repository? (y/n) ",
103
+ (answer) => {
104
+ if (answer.toLowerCase() === "y" || answer.toLowerCase() === "yes") {
105
+ console.log("Initializing Git repository...");
106
+ const initializedGit = runCommand(initGit);
107
+ if (!initializedGit) {
108
+ console.error("Failed to initialize Git repository");
109
+ process.exit(1);
110
+ }
111
+ console.log("Git repository initialized successfully!");
112
+ }
113
+
114
+ if (useVSCode) {
115
+ console.log("Opening in Visual Studio Code...");
116
+ runCommand(openVSCode);
117
+ } else if (useCursor) {
118
+ console.log("Opening in Cursor...");
119
+ runCommand(openCursor);
120
+ }
121
+
122
+ console.log("\nHappy coding! 🎉");
123
+ rl.close();
124
+ }
125
+ );
126
+ }
package/package.json CHANGED
@@ -1,9 +1,19 @@
1
1
  {
2
2
  "name": "@ardly/bunext",
3
- "description": "Bunext - A Next.js 15 template with Tailwind CSS, shadcn ui and Bun with some utilities built in",
3
+ "description": "CLI tool to create Next.js projects using the Bunext template",
4
4
  "author": "Ard Astroid <ardastroid@gmail.com>",
5
- "version": "1.0.6",
6
- "bin": "./bin/cli.mjs",
5
+ "version": "1.0.7",
6
+ "bin": {
7
+ "create-bunext": "./cli.mjs"
8
+ },
9
+ "type": "module",
10
+ "files": [
11
+ "cli.mjs"
12
+ ],
13
+ "main": "cli.mjs",
14
+ "engines": {
15
+ "node": ">=20.0.0"
16
+ },
7
17
  "keywords": [
8
18
  "next.js",
9
19
  "react",
@@ -13,59 +23,5 @@
13
23
  "bun",
14
24
  "template",
15
25
  "starter"
16
- ],
17
- "scripts": {
18
- "dev": "next dev --turbopack",
19
- "build": "next build",
20
- "start": "next start",
21
- "preview": "next build && next start",
22
- "lint": "next lint",
23
- "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,scss,md}\""
24
- },
25
- "dependencies": {
26
- "@radix-ui/react-avatar": "^1.1.2",
27
- "@radix-ui/react-dialog": "^1.1.4",
28
- "@radix-ui/react-dropdown-menu": "^2.1.4",
29
- "@radix-ui/react-label": "^2.1.1",
30
- "@radix-ui/react-popover": "^1.1.4",
31
- "@radix-ui/react-radio-group": "^1.2.2",
32
- "@radix-ui/react-separator": "^1.1.1",
33
- "@radix-ui/react-slot": "^1.1.1",
34
- "@radix-ui/react-toast": "^1.2.4",
35
- "@radix-ui/react-tooltip": "^1.1.6",
36
- "class-variance-authority": "^0.7.1",
37
- "clsx": "^2.1.1",
38
- "cmdk": "1.0.0",
39
- "lucide-react": "^0.460.0",
40
- "next": "15.1.1",
41
- "next-themes": "^0.4.4",
42
- "nuqs": "^2.2.3",
43
- "react": "19.0.0",
44
- "react-dom": "19.0.0",
45
- "tailwind-merge": "^2.5.5",
46
- "tailwindcss-animate": "^1.0.7",
47
- "vaul": "^1.1.2",
48
- "zod": "^3.24.1"
49
- },
50
- "devDependencies": {
51
- "@types/node": "^20.17.10",
52
- "@types/react": "19.0.1",
53
- "@types/react-dom": "19.0.2",
54
- "eslint": "^8.57.1",
55
- "eslint-config-next": "15.1.1",
56
- "eslint-config-prettier": "^9.1.0",
57
- "fluid-tailwind": "^1.0.4",
58
- "postcss": "^8.4.49",
59
- "prettier": "^3.4.2",
60
- "prettier-plugin-tailwindcss": "^0.6.9",
61
- "tailwindcss": "^3.4.17",
62
- "tailwindcss-motion": "^1.0.0",
63
- "typescript": "^5.7.2"
64
- },
65
- "overrides": {
66
- "react": "19.0.0",
67
- "react-dom": "19.0.0",
68
- "@types/react": "19.0.1",
69
- "@types/react-dom": "19.0.2"
70
- }
26
+ ]
71
27
  }
package/.eslintrc.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": ["next/core-web-vitals", "next/typescript", "prettier"],
3
- "rules": {
4
- "@typescript-eslint/no-unused-vars": "off",
5
- "@next/next/no-img-element": "off",
6
- "@typescript-eslint/no-explicit-any": "off"
7
- }
8
- }
package/.prettierignore DELETED
@@ -1,4 +0,0 @@
1
- node_modules
2
- .next
3
- build
4
- dist
package/STRUCTURE.md DELETED
@@ -1,77 +0,0 @@
1
- ## Bunext Folder Structure
2
-
3
- ```sh
4
- ├── .env
5
- ├── .env.example
6
- ├── .eslintrc.json
7
- ├── .gitignore
8
- ├── CONVENTION.md
9
- ├── README.md
10
- ├── biome.json
11
- ├── bun.lockb
12
- ├── components.json
13
- ├── next-env.d.ts
14
- ├── next.config.ts
15
- ├── package.json
16
- ├── postcss.config.mjs
17
- ├── tailwind.config.ts
18
- ├── tsconfig.json
19
- ├── public/
20
- └── src/
21
- ├── actions/
22
- ├── app/
23
- │ ├── (index)/
24
- │ │ ├── intr/
25
- │ │ ├── pagetr/
26
- │ │ └── page.tsx
27
- │ ├── layout.tsx
28
- │ ├── not-found.tsx
29
- │ └── sitemap.ts
30
- ├── components/
31
- │ ├── Providers/ # providers for the app
32
- │ │ ├── root-provider.tsx
33
- │ │ └── theme-provider.tsx
34
- │ ├── navigation/ # navigation components
35
- │ │ ├── footer.tsx
36
- │ │ ├── main-nav.tsx
37
- │ │ ├── mobile-nav.tsx
38
- │ │ └── site-header.tsx
39
- │ ├── ui/ # shadcn-ui components
40
- │ ├── utils/ # custom utility components
41
- │ │ ├── ConditionalLink.tsx
42
- │ │ ├── Image.tsx
43
- │ │ ├── Img.tsx
44
- │ │ ├── Spinner.tsx
45
- │ │ ├── TopButton.tsx
46
- │ │ ├── TransitionLink.tsx
47
- │ │ ├── featureFlag.tsx
48
- │ │ ├── icons.tsx
49
- │ │ └── share-modal.tsx
50
- │ ├── brand.tsx
51
- │ └── TestComp.tsx
52
- ├── hooks/
53
- │ ├── use-intersection.ts
54
- │ ├── use-lazy-load.ts
55
- │ ├── use-meta-color.ts
56
- │ └── use-toast.ts
57
- ├── lib/
58
- │ ├── config/
59
- │ │ ├── featureflags.ts
60
- │ │ ├── siteConfig.ts
61
- │ │ └── user.ts
62
- │ ├── data/ # data files for core site config & seo
63
- │ │ ├── footer-data.ts
64
- │ │ ├── nav-data.ts
65
- │ │ └── siteData.ts
66
- │ └── utils.ts # utility functions
67
- ├── styles/
68
- │ ├── customGlobal.css
69
- │ ├── globals.css
70
- │ └── tailwind/
71
- │ ├── base.ts
72
- │ ├── fonts.ts
73
- │ ├── tailwindUtils.ts
74
- │ └── fonts/
75
- └── types/
76
- └── index.ts
77
- ```
package/bin/cli.mjs DELETED
@@ -1,126 +0,0 @@
1
- #! /usr/bin/env node
2
-
3
- import { execSync } from 'child_process'
4
- import readline from 'readline'
5
-
6
- const runCommand = (command) => {
7
- try {
8
- execSync(`${command}`, { stdio: 'inherit' })
9
- } catch (error) {
10
- console.error(`Failed to run command: ${command}`, error)
11
- return false
12
- }
13
- return true
14
- }
15
-
16
- const rl = readline.createInterface({
17
- input: process.stdin,
18
- output: process.stdout,
19
- })
20
-
21
- let repoName = process.argv[2]
22
- const args = process.argv.slice(2)
23
- const useVSCode = args.includes('--vs')
24
- const useCursor = args.includes('--cursor')
25
-
26
- const validateRepoName = (name) => {
27
- const validNameRegex = /^[a-z0-9-]+$/
28
- return validNameRegex.test(name)
29
- }
30
-
31
- const promptForValidRepoName = (callback) => {
32
- rl.question(
33
- 'Please enter a name for your project (lowercase letters, numbers and hyphens only): ',
34
- (answer) => {
35
- if (validateRepoName(answer)) {
36
- repoName = answer
37
- callback()
38
- } else {
39
- console.error(
40
- 'Invalid project name. Please use only lowercase letters, numbers and hyphens.'
41
- )
42
- promptForValidRepoName(callback)
43
- }
44
- }
45
- )
46
- }
47
-
48
- if (!repoName || repoName.startsWith('--')) {
49
- promptForValidRepoName(initializeProject)
50
- } else if (!validateRepoName(repoName)) {
51
- console.error(
52
- 'Invalid project name. Please use only lowercase letters, numbers and hyphens.'
53
- )
54
- promptForValidRepoName(initializeProject)
55
- } else {
56
- initializeProject()
57
- }
58
-
59
- function initializeProject() {
60
- const gitCheckout = `git clone --depth 1 https://github.com/DarkidOP/Bunext.git ${repoName}`
61
- const removeGit = `cd ${repoName} && rm -rf .git`
62
- const initGit = `cd ${repoName} && git init && git add . && git commit -m "Initial commit"`
63
- const openVSCode = `cd ${repoName} && code .`
64
- const openCursor = `cd ${repoName} && cursor .`
65
-
66
- // Determine package manager based on how script was executed
67
- let packageManager = 'npm'
68
- if (process.env.npm_execpath?.includes('pnpm')) {
69
- packageManager = 'pnpm'
70
- } else if (process.env.npm_execpath?.includes('yarn')) {
71
- packageManager = 'yarn'
72
- } else if (process.argv[1].includes('bunx')) {
73
- packageManager = 'bun'
74
- }
75
-
76
- const installDeps = `cd ${repoName} && ${packageManager}${packageManager === 'npm' ? ' install --legacy-peer-deps' : ' install'}`
77
-
78
- console.log(`Creating project template in ./${repoName}`)
79
- const checkedOut = runCommand(gitCheckout)
80
- if (!checkedOut) {
81
- console.error(
82
- 'Failed to clone template repository "https://github.com/DarkidOP/Bunext.git"'
83
- )
84
- process.exit(1)
85
- }
86
-
87
- console.log('Removing Git history...')
88
- const removedGit = runCommand(removeGit)
89
- if (!removedGit) {
90
- console.error('Failed to remove Git history')
91
- process.exit(1)
92
- }
93
-
94
- console.log('Installing dependencies...')
95
- const installedDeps = runCommand(installDeps)
96
- if (!installedDeps) {
97
- console.error('Failed to install dependencies')
98
- process.exit(1)
99
- }
100
-
101
- rl.question(
102
- 'Would you like to initialize a new git repository? (y/n) ',
103
- (answer) => {
104
- if (answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
105
- console.log('Initializing Git repository...')
106
- const initializedGit = runCommand(initGit)
107
- if (!initializedGit) {
108
- console.error('Failed to initialize Git repository')
109
- process.exit(1)
110
- }
111
- console.log('Git repository initialized successfully!')
112
- }
113
-
114
- if (useVSCode) {
115
- console.log('Opening in Visual Studio Code...')
116
- runCommand(openVSCode)
117
- } else if (useCursor) {
118
- console.log('Opening in Cursor...')
119
- runCommand(openCursor)
120
- }
121
-
122
- console.log('\nHappy coding! 🎉')
123
- rl.close()
124
- }
125
- )
126
- }
package/components.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "default",
4
- "rsc": true,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "tailwind.config.ts",
8
- "css": "src/styles/globals.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/utils",
16
- "ui": "@/components/ui",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "iconLibrary": "lucide"
21
- }
package/next.config.ts DELETED
@@ -1,22 +0,0 @@
1
- import type { NextConfig } from 'next'
2
-
3
- const nextConfig: NextConfig = {
4
- /* config options here */
5
- eslint: {
6
- ignoreDuringBuilds: false,
7
- },
8
- images: {
9
- remotePatterns: [
10
- { protocol: 'https', hostname: 'v0.dev', pathname: '/placeholder.svg' },
11
- ],
12
- },
13
- logging: {
14
- fetches: {
15
- fullUrl: true,
16
- },
17
- },
18
- compiler:
19
- process.env.NODE_ENV === 'production' ? { removeConsole: true } : {},
20
- }
21
-
22
- export default nextConfig
@@ -1,8 +0,0 @@
1
- /** @type {import('postcss-load-config').Config} */
2
- const config = {
3
- plugins: {
4
- tailwindcss: {},
5
- },
6
- };
7
-
8
- export default config;
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- plugins: ['prettier-plugin-tailwindcss'],
3
- semi: false,
4
- singleQuote: true,
5
- tabWidth: 2,
6
- trailingComma: 'es5',
7
- }
Binary file
Binary file
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 80 80"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-2,.cls-3,.cls-4{fill:#070707;}.cls-3{opacity:0.14;}.cls-4{opacity:0.3;}.cls-5{fill:#08090a;}.cls-6{fill:#f18a5c;}</style><linearGradient id="linear-gradient" x1="41.94" y1="17.58" x2="38.61" y2="71.97" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9f1e1"/><stop offset="1" stop-color="#faf8fa"/></linearGradient></defs><path class="cls-1" d="M74.11,34.38C70.67,27,64.91,23,59,19.35h0a89.47,89.47,0,0,1-11.58-9c-.21-.2-.48-.33-.71-.51a.69.69,0,0,0-1,0C44,11.28,42.48,10.91,41,9.25c-.15-.17-.37-.26-.51-.44-.82-1-1.47-.87-2.31.12-1.82,2.13-2,2.16-4.16.68-1.09-.74-1.81-.53-2.63.47a64.85,64.85,0,0,1-10.08,9.63c-2.71,2.15-5.4,4.34-7.94,6.78A38.59,38.59,0,0,0,4.66,38.16a25,25,0,0,0-1.4,17.2h0c1.37,5.8,4.16,10,9,12A70.48,70.48,0,0,0,31.6,71.92a94.32,94.32,0,0,0,30.29-2.31,37.85,37.85,0,0,0,9.37-3.37A9.56,9.56,0,0,0,76.12,60,35.27,35.27,0,0,0,74.11,34.38Z"/><path class="cls-2" d="M39.34,74.87a81.43,81.43,0,0,1-26.26-4.5C5.59,67.83,1.76,61.53.54,52.52S2.14,36.33,7.05,30C11,25,15.72,21.14,20.46,17.36A69,69,0,0,0,30.19,8c1.67-2,2.49-2.13,4.54-.77a1.49,1.49,0,0,0,2.32-.37c2-2.28,2.27-2.25,4.44-.38a3,3,0,0,1,.42.37C43,8.1,44,8.49,45.27,7.22a1.3,1.3,0,0,1,1.5-.12,8.46,8.46,0,0,1,2.62,1.78c3.76,3.69,8,6.39,12.21,9.19,3.88,2.59,7.68,5.32,10.76,9.27,4.47,5.72,6.78,12.62,7.3,20.46a36.52,36.52,0,0,1-2,14.27,10.57,10.57,0,0,1-4.43,5.81c-3.84,2.43-8,3.58-12.19,4.53A105.83,105.83,0,0,1,39.34,74.87ZM59,19.35a89.47,89.47,0,0,1-11.58-9c-.21-.2-.48-.33-.71-.51a.69.69,0,0,0-1,0C44,11.28,42.48,10.91,41,9.25c-.15-.17-.37-.26-.51-.44-.82-1-1.47-.87-2.31.12-1.82,2.13-2,2.16-4.16.68-1.09-.74-1.81-.53-2.63.47a64.85,64.85,0,0,1-10.08,9.63c-2.71,2.15-5.4,4.34-7.94,6.78A38.59,38.59,0,0,0,4.66,38.16a25,25,0,0,0-1.4,17.2c1.37,5.8,4.15,10,9,12A70.48,70.48,0,0,0,31.6,71.92a94.32,94.32,0,0,0,30.29-2.31,37.85,37.85,0,0,0,9.37-3.37A9.56,9.56,0,0,0,76.12,60a35.27,35.27,0,0,0-2-25.64C70.67,27,64.91,23,59,19.35Z"/><path class="cls-3" d="M3.26,55.36c1.18.51,1.76,1.86,2.57,2.84A25.48,25.48,0,0,0,20.9,67.13a66.14,66.14,0,0,0,16.18.94,77.8,77.8,0,0,0,11.21-1.52,82.55,82.55,0,0,0,14.39-4.33,26.23,26.23,0,0,0,3.77-1.84c3-1.74,4.49-4.73,5.26-8.5a45.47,45.47,0,0,0,.77-8.55,22.15,22.15,0,0,0-4.21-13.81c-2.58-3.49-5.66-6.21-8.64-9.1-.3-.3-.64-.52-.64-1.07C64.91,23,70.67,27,74.11,34.38a35.27,35.27,0,0,1,2,25.64,9.56,9.56,0,0,1-4.86,6.22,37.85,37.85,0,0,1-9.37,3.37A94.32,94.32,0,0,1,31.6,71.92a70.48,70.48,0,0,1-19.38-4.61C7.41,65.38,4.63,61.16,3.26,55.36Z"/><path class="cls-4" d="M37.53,13.92a14.62,14.62,0,0,1,1.83,8.89,5.31,5.31,0,0,1-.69,2.11,14,14,0,0,1-8.9,6.35,5.76,5.76,0,0,1,.91-1.86,36.31,36.31,0,0,1,3.86-5.16,8.82,8.82,0,0,0,2.11-5.09A39.25,39.25,0,0,1,37.53,13.92Z"/><path class="cls-4" d="M41.16,33.28a27.11,27.11,0,0,1,.35-7.78,27.36,27.36,0,0,0-.14-9.34c-.1-.66-.13-1.34-.2-2.05,2.29,1.21,4.32,5.16,4.19,8.39A18.11,18.11,0,0,1,41.16,33.28Z"/><path class="cls-4" d="M51,30.28a18.68,18.68,0,0,1-1.75-6A19.33,19.33,0,0,0,47,17.37c-.46-.84-.81-1.77-1.22-2.68,1.63-.33,4.38,1.37,5.51,3.64C53.24,22.24,52.4,26.14,51,30.28Z"/><path class="cls-4" d="M33.66,13.9C34.9,18.62,32.88,23,29.21,24a8.64,8.64,0,0,1-5.92-.35A8.41,8.41,0,0,1,26.54,21a11.64,11.64,0,0,0,6-5.57A11.68,11.68,0,0,1,33.66,13.9Z"/><path class="cls-5" d="M50.14,50.89a4.48,4.48,0,0,1-4.25-4.74,4.34,4.34,0,1,1,8.64.18A4.44,4.44,0,0,1,50.14,50.89Z"/><path class="cls-5" d="M35.11,58C32.28,57.75,30,56,27.9,53.82a1.15,1.15,0,0,1-.07-1.49.76.76,0,0,1,1.22-.2c.57.45,1.09,1,1.66,1.45,3.64,2.94,6.58,2.74,9.94-.66a2.2,2.2,0,0,0,.2-.23c.49-.64,1-1,1.61-.22a1.36,1.36,0,0,1-.33,1.86A11.49,11.49,0,0,1,35.11,58Z"/><path class="cls-5" d="M21.93,42a4.56,4.56,0,0,1,4.12,4.91,4.51,4.51,0,0,1-4.5,4.46,4.61,4.61,0,0,1-4.14-4.76A4.52,4.52,0,0,1,21.93,42Z"/><path class="cls-6" d="M13.72,53.48a2.42,2.42,0,0,1-2.65-2.2,2.47,2.47,0,0,1,2.63-2.05c1.45,0,2.74,1,2.74,2.12S15.22,53.48,13.72,53.48Z"/><path class="cls-6" d="M57.16,53.57c-1.51,0-2.78-1-2.73-2.11s1.27-2,2.7-2,2.73.84,2.74,2S58.73,53.58,57.16,53.57Z"/></svg>
Binary file
package/public/logo.svg DELETED
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 192 192"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-2,.cls-3{fill:#070707;}.cls-2{opacity:0.14;}.cls-3{opacity:0.3;}.cls-4{fill:#08090a;}.cls-5{fill:#f18a5c;}</style><linearGradient id="linear-gradient" x1="100.54" y1="42.93" x2="92.74" y2="170.51" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f9f1e1"/><stop offset="1" stop-color="#faf8fa"/></linearGradient></defs><path class="cls-1" d="M176,82.34c-8.07-17.28-21.58-26.61-35.47-35.26h0c-9.37-6.43-18.67-13-27.16-21.12a15.65,15.65,0,0,0-1.68-1.22,1.63,1.63,0,0,0-2.27,0c-4,3.39-7.61,2.52-11-1.37-.35-.4-.85-.62-1.19-1-1.91-2.37-3.44-2-5.43.29-4.25,5-4.61,5.07-9.75,1.59C79.5,22.5,77.81,23,75.9,25.33,68.78,34,60.68,41.23,52.25,47.92,45.9,53,39.58,58.09,33.63,63.83,25.57,71.59,18.2,80.12,13.1,91.19c-5.93,12.86-6.9,26.33-3.28,40.36h0c3.21,13.59,9.75,23.5,21,28A164.25,164.25,0,0,0,76.3,170.37c23.87,2.35,47.55,0,71-5.4a89.21,89.21,0,0,0,22-7.9c5.53-2.91,9.33-7.5,11.41-14.6C186.88,121.45,184.92,101.44,176,82.34Z"/><path class="cls-2" d="M9.82,131.55c2.76,1.18,4.13,4.36,6,6.65,9.89,11.9,21.81,18.18,35.34,21,12.61,2.59,25.27,2.71,37.94,2.19,8.81-.36,17.58-1.9,26.31-3.56a194.37,194.37,0,0,0,33.75-10.16,59.46,59.46,0,0,0,8.83-4.31c6.93-4.08,10.54-11.1,12.34-19.94a106.48,106.48,0,0,0,1.82-20.06c.14-12.21-3-23.09-9.89-32.39-6.05-8.18-13.26-14.58-20.25-21.35-.72-.69-1.52-1.2-1.51-2.5,13.89,8.65,27.4,18,35.47,35.26,8.91,19.1,10.87,39.11,4.72,60.13-2.08,7.1-5.88,11.69-11.41,14.6a89.21,89.21,0,0,1-22,7.9c-23.49,5.37-47.17,7.75-71,5.41a164.62,164.62,0,0,1-45.48-10.82C19.57,155.05,13,145.14,9.82,131.55Z"/><path class="cls-3" d="M90.21,34.35c3.55,6.71,5.21,13.39,4.29,20.85a12.59,12.59,0,0,1-1.63,4.95C87.72,68.6,80.53,72.72,72,75a13.88,13.88,0,0,1,2.13-4.35,85.47,85.47,0,0,1,9.06-12.11,20.79,20.79,0,0,0,5-11.94A86.45,86.45,0,0,1,90.21,34.35Z"/><path class="cls-3" d="M98.71,79.76a63.7,63.7,0,0,1,.84-18.26c1.4-7.41.77-14.62-.34-21.9-.23-1.55-.31-3.14-.47-4.82,5.38,2.85,10.15,12.1,9.82,19.69C108.15,64.22,104.6,72.31,98.71,79.76Z"/><path class="cls-3" d="M121.7,72.71a43.74,43.74,0,0,1-4.09-14,45.43,45.43,0,0,0-5.21-16.24c-1.08-2-1.9-4.14-2.86-6.29,3.81-.77,10.26,3.22,12.92,8.54C127.05,53.86,125.09,63,121.7,72.71Z"/><path class="cls-3" d="M81.13,34.29C84,45.36,79.3,55.69,70.69,58c-5,1.33-10,1.07-13.89-.83A19.68,19.68,0,0,1,64.43,51a27.38,27.38,0,0,0,14-13.09A30.63,30.63,0,0,1,81.13,34.29Z"/><path class="cls-4" d="M119.78,121.06c-5.62-.07-10.11-5.07-10-11.12S114.6,99,120.13,99.15s10.06,5.17,10,11.21S125.47,121.13,119.78,121.06Z"/><path class="cls-4" d="M84.54,137.83c-6.65-.67-12-4.86-16.93-9.89a2.68,2.68,0,0,1-.15-3.5,1.79,1.79,0,0,1,2.86-.48c1.33,1.06,2.56,2.33,3.88,3.4,8.54,6.91,15.44,6.44,23.32-1.54a5.82,5.82,0,0,0,.46-.53c1.15-1.5,2.45-2.4,3.79-.52,1.2,1.69.35,3.18-.77,4.37A27,27,0,0,1,84.54,137.83Z"/><path class="cls-4" d="M53.61,100.24c5.61.29,10,5.46,9.68,11.51s-5.12,10.79-10.57,10.45-9.8-5.31-9.7-11.15C43.12,104.87,48,100,53.61,100.24Z"/><path class="cls-5" d="M34.35,127.13c-3.5,0-6.33-2.34-6.22-5.15.12-2.65,2.86-4.78,6.19-4.82s6.41,2.29,6.42,5S37.87,127.12,34.35,127.13Z"/><path class="cls-5" d="M136.24,127.36c-3.54,0-6.51-2.33-6.39-5s3-4.63,6.32-4.69c3.67-.06,6.41,2,6.43,4.8S139.93,127.37,136.24,127.36Z"/></svg>
Binary file
@@ -1,19 +0,0 @@
1
- {
2
- "name": "Bunext",
3
- "short_name": "Bunext",
4
- "icons": [
5
- {
6
- "src": "/android-chrome-192x192.png",
7
- "sizes": "192x192",
8
- "type": "image/png"
9
- },
10
- {
11
- "src": "/android-chrome-512x512.png",
12
- "sizes": "512x512",
13
- "type": "image/png"
14
- }
15
- ],
16
- "theme_color": "#fbf0df",
17
- "background_color": "#2d2b2a",
18
- "display": "standalone"
19
- }