create-reactivite 1.0.1 β†’ 1.0.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.
Files changed (3) hide show
  1. package/README.md +177 -0
  2. package/index.js +35 -7
  3. package/package.json +40 -7
package/README.md ADDED
@@ -0,0 +1,177 @@
1
+ # create-reactivite
2
+
3
+ A modern React boilerplate generator that creates production-ready applications with React, Vite, TypeScript, Tailwind CSS, and shadcn/ui components.
4
+
5
+ ## πŸš€ Features
6
+
7
+ - **⚑ Vite** - Lightning fast build tool and dev server
8
+ - **βš›οΈ React 19** - Latest React with modern features
9
+ - **πŸ“˜ TypeScript** - Full TypeScript support with strict configuration
10
+ - **🎨 Tailwind CSS v4** - Latest Tailwind with modern CSS features
11
+ - **🧩 shadcn/ui** - Beautiful, accessible UI components
12
+ - **πŸ“¦ Radix UI** - Unstyled, accessible components
13
+ - **πŸŒ™ Dark Mode** - Built-in theme switching with next-themes
14
+ - **πŸ“… Date Picker** - React Day Picker integration
15
+ - **πŸ”” Toast Notifications** - Sonner for elegant notifications
16
+ - **🎯 ESLint** - Code linting with modern configuration
17
+ - **πŸ“± Responsive** - Mobile-first responsive design
18
+ - **🎭 Icons** - Lucide React icon library
19
+
20
+ ## πŸ“¦ Installation
21
+
22
+ ### Using npx (Recommended)
23
+
24
+ ```bash
25
+ npx create-reactivite my-app
26
+ cd my-app
27
+ pnpm dev
28
+ ```
29
+
30
+ ### Using npm
31
+
32
+ ```bash
33
+ npm create reactivite my-app
34
+ cd my-app
35
+ npm run dev
36
+ ```
37
+
38
+ ### Install in current directory
39
+
40
+ ```bash
41
+ npx create-reactivite .
42
+ ```
43
+
44
+ ## πŸ› οΈ What's Included
45
+
46
+ ### Core Technologies
47
+
48
+ - **React 19.1.1** - Latest React with concurrent features
49
+ - **TypeScript 5.9.3** - Strict type checking
50
+ - **Vite 7.1.7** - Fast build tool and dev server
51
+ - **Tailwind CSS 4.1.14** - Utility-first CSS framework
52
+
53
+ ### UI Components
54
+
55
+ The template includes a comprehensive set of pre-built shadcn/ui components:
56
+
57
+ - **Layout**: Card, Separator, Dialog
58
+ - **Forms**: Button, Checkbox, Select, Calendar
59
+ - **Navigation**: Accordion, Collapsible, Toggle
60
+ - **Feedback**: Alert, Badge, Spinner, Toast (Sonner)
61
+ - **Data Display**: Avatar, Table, Tooltip
62
+
63
+ ### Development Tools
64
+
65
+ - **ESLint** - Code linting with React and TypeScript rules
66
+ - **TypeScript** - Strict configuration for better code quality
67
+ - **Path Aliases** - Clean imports with `@/` prefix
68
+ - **Hot Reload** - Instant updates during development
69
+
70
+ ## πŸ—οΈ Project Structure
71
+
72
+ ```
73
+ my-app/
74
+ β”œβ”€β”€ public/
75
+ β”‚ └── vite.svg
76
+ β”œβ”€β”€ src/
77
+ β”‚ β”œβ”€β”€ assets/
78
+ β”‚ β”œβ”€β”€ components/
79
+ β”‚ β”‚ β”œβ”€β”€ ui/ # shadcn/ui components
80
+ β”‚ β”‚ └── home-page-components/
81
+ β”‚ β”œβ”€β”€ lib/
82
+ β”‚ β”‚ └── utils.ts # Utility functions
83
+ β”‚ β”œβ”€β”€ pages/
84
+ β”‚ β”‚ └── Homepage/
85
+ β”‚ β”œβ”€β”€ App.tsx
86
+ β”‚ β”œβ”€β”€ main.tsx
87
+ β”‚ └── global.css
88
+ β”œβ”€β”€ components.json # shadcn/ui configuration
89
+ β”œβ”€β”€ package.json
90
+ β”œβ”€β”€ tsconfig.json
91
+ β”œβ”€β”€ vite.config.ts
92
+ └── eslint.config.js
93
+ ```
94
+
95
+ ## πŸš€ Getting Started
96
+
97
+ 1. **Create your project**:
98
+ ```bash
99
+ npx create-reactivite my-awesome-app
100
+ cd my-awesome-app
101
+ ```
102
+
103
+ 2. **Install dependencies** (automatically done):
104
+ ```bash
105
+ pnpm install # or npm install
106
+ ```
107
+
108
+ 3. **Start development server**:
109
+ ```bash
110
+ pnpm dev # or npm run dev
111
+ ```
112
+
113
+ 4. **Open your browser** and visit `http://localhost:5173`
114
+
115
+ ## πŸ“ Available Scripts
116
+
117
+ - `pnpm dev` - Start development server
118
+ - `pnpm build` - Build for production
119
+ - `pnpm preview` - Preview production build
120
+ - `pnpm lint` - Run ESLint
121
+
122
+ ## 🎨 Adding Components
123
+
124
+ This template uses shadcn/ui. To add new components:
125
+
126
+ ```bash
127
+ npx shadcn@latest add button
128
+ npx shadcn@latest add input
129
+ npx shadcn@latest add form
130
+ ```
131
+
132
+ ## πŸ”§ Configuration
133
+
134
+ ### Tailwind CSS
135
+
136
+ The project uses Tailwind CSS v4 with the new Vite plugin. Configuration is handled through CSS variables and the `components.json` file.
137
+
138
+ ### TypeScript
139
+
140
+ Strict TypeScript configuration is included with path aliases:
141
+
142
+ ```typescript
143
+ import { Button } from "@/components/ui/button"
144
+ import { utils } from "@/lib/utils"
145
+ ```
146
+
147
+ ### ESLint
148
+
149
+ Modern ESLint configuration with React and TypeScript support.
150
+
151
+ ## πŸŒ™ Dark Mode
152
+
153
+ Dark mode is pre-configured using `next-themes`. Toggle between light and dark themes seamlessly.
154
+
155
+ ## πŸ“± Responsive Design
156
+
157
+ All components are built with mobile-first responsive design principles using Tailwind CSS.
158
+
159
+ ## 🀝 Contributing
160
+
161
+ Contributions are welcome! Please feel free to submit a Pull Request.
162
+
163
+ ## πŸ“„ License
164
+
165
+ MIT License - feel free to use this template for your projects.
166
+
167
+ ## πŸ”— Links
168
+
169
+ - [React](https://react.dev/)
170
+ - [Vite](https://vite.dev/)
171
+ - [Tailwind CSS](https://tailwindcss.com/)
172
+ - [shadcn/ui](https://ui.shadcn.com/)
173
+ - [TypeScript](https://www.typescriptlang.org/)
174
+
175
+ ---
176
+
177
+ **Happy coding! πŸŽ‰**
package/index.js CHANGED
@@ -15,28 +15,56 @@ const __dirname = path.dirname(__filename);
15
15
  type: "text",
16
16
  name: "projectName",
17
17
  message: "Project name:",
18
- initial: "my-react-app"
18
+ initial: "my-react-app",
19
19
  });
20
20
 
21
- const targetPath = path.resolve(process.cwd(), projectName);
21
+ // 🧩 1. Target folderΔ± mΓΌΙ™yyΙ™n edirik
22
+ const isCurrentDir = projectName === "." || projectName === "./";
23
+ const targetPath = isCurrentDir
24
+ ? process.cwd()
25
+ : path.resolve(process.cwd(), projectName);
26
+
22
27
  const templatePath = path.resolve(__dirname, "template");
23
28
 
24
- if (fs.existsSync(targetPath)) {
29
+ // 🧩 2. ƏgΙ™r current folderdirsΙ™ β€” iΓ§i boşdursa davam et, yoxsa xΙ™bΙ™rdarlΔ±q ver
30
+ if (isCurrentDir) {
31
+ const files = fs.readdirSync(targetPath).filter(
32
+ (f) => f !== "node_modules" && f !== ".git"
33
+ );
34
+
35
+ if (files.length > 0) {
36
+ const { overwrite } = await prompts({
37
+ type: "confirm",
38
+ name: "overwrite",
39
+ message: "⚠️ Current folder is not empty. Continue and overwrite?",
40
+ initial: false,
41
+ });
42
+
43
+ if (!overwrite) {
44
+ console.log("❌ Operation cancelled.");
45
+ process.exit(1);
46
+ }
47
+ }
48
+ } else if (fs.existsSync(targetPath)) {
25
49
  console.error(`❌ Folder "${projectName}" already exists!`);
26
50
  process.exit(1);
27
51
  }
28
52
 
53
+ // 🧩 3. Faylları kopyalayırıq
29
54
  console.log("πŸ“¦ Creating project...");
30
55
  await copy(templatePath, targetPath);
31
56
 
57
+ // 🧩 4. Asılılıqları quraşdırırıq
32
58
  console.log("πŸ“₯ Installing dependencies...");
33
- await execa("pnpm", ["install"], { cwd: targetPath, stdio: "inherit" }).catch(async () => {
59
+ try {
60
+ await execa("pnpm", ["install"], { cwd: targetPath, stdio: "inherit" });
61
+ } catch {
34
62
  console.log("⚠️ pnpm not found, trying npm...");
35
63
  await execa("npm", ["install"], { cwd: targetPath, stdio: "inherit" });
36
- });
64
+ }
37
65
 
66
+ // 🧩 5. Bitdi mesajı
38
67
  console.log(`βœ… Done! Next steps:
39
- cd ${projectName}
40
- pnpm dev (or npm run dev)
68
+ ${isCurrentDir ? "" : `cd ${projectName}\n`}pnpm dev (or npm run dev)
41
69
  `);
42
70
  })();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-reactivite",
3
- "version": "1.0.1",
4
- "description": "React + Vite + Tailwind boilerplate creator",
3
+ "version": "1.0.3",
4
+ "description": "⚑ Effortlessly scaffold modern React + Vite + Tailwind CSS projects with a clean structure and ready-to-use configuration. Create Reactivite helps you instantly start new React apps with best practices, Shadcn/UI support, and zero setup hassle.",
5
5
  "bin": {
6
6
  "create-reactivite": "./index.js"
7
7
  },
@@ -10,9 +10,42 @@
10
10
  "index.js",
11
11
  "template/"
12
12
  ],
13
- "dependencies": {
14
- "prompts": "^2.4.2",
15
- "fs-extra": "^11.2.0",
16
- "execa": "^7.1.0"
17
- }
13
+ "dependencies": {
14
+ "prompts": "^2.4.2",
15
+ "fs-extra": "^11.2.0",
16
+ "execa": "^7.1.0"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/jsznpm/create-reactivite.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/jsznpm/create-reactivite/issues"
24
+ },
25
+ "homepage": "https://github.com/jsznpm/create-reactivite#readme",
26
+ "keywords": [
27
+ "react",
28
+ "vite",
29
+ "tailwind",
30
+ "tailwindcss",
31
+ "shadcn",
32
+ "boilerplate",
33
+ "template",
34
+ "react-template",
35
+ "vite-react-template",
36
+ "create-react-app",
37
+ "react-cli",
38
+ "project-generator",
39
+ "starter-kit",
40
+ "frontend",
41
+ "typescript",
42
+ "reactivite",
43
+ "create-reactivite"
44
+ ],
45
+ "author": {
46
+ "name": "Javid Salimov",
47
+ "email": "",
48
+ "url": "https://github.com/jsznpm"
49
+ },
50
+ "license": "MIT"
18
51
  }