create-reactivite 1.2.0 → 1.3.0

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/README.md CHANGED
@@ -10,6 +10,7 @@ When you run the CLI you pick one of two templates:
10
10
  | --- | --- |
11
11
  | **React + Vite** | React 19, Vite 8 (Rolldown), Tailwind v4, shadcn/ui, React Router v7, Recharts |
12
12
  | **Next.js 16** | Next.js 16 (App Router), React 19, Tailwind v4, shadcn/ui, i18n, TanStack Query, axios + orval, Zustand, react-hook-form + zod, husky, Vitest + MSW |
13
+ | **Rspack** | React 19 + TypeScript, Rspack bundler (SWC). Minimal starter — grow it yourself. |
13
14
 
14
15
  ```
15
16
  $ npx create-reactivite my-app
@@ -18,6 +19,7 @@ $ npx create-reactivite my-app
18
19
  ? Pick a template: ›
19
20
  ❯ React + Vite (Tailwind v4, shadcn/ui, React Router)
20
21
  Next.js 16 (App Router, i18n, TanStack Query, orval, Zustand, husky)
22
+ Rspack (minimal React + TypeScript starter)
21
23
  ```
22
24
 
23
25
  ## 📦 Installation
@@ -169,9 +171,44 @@ my-app/
169
171
 
170
172
  ---
171
173
 
174
+ ## 🦀 Template 3 — Rspack (minimal)
175
+
176
+ A deliberately bare **React + TypeScript** starter on [Rspack](https://rspack.dev/) (Rust-based bundler, built-in SWC). No router, no UI kit — a clean base to build on.
177
+
178
+ ### Scripts
179
+
180
+ - `pnpm dev` — dev server (port 5174)
181
+ - `pnpm build` — production build → `dist/`
182
+ - `pnpm preview` — serve the production build
183
+
184
+ ### Structure
185
+
186
+ ```
187
+ my-app/
188
+ ├── index.html
189
+ ├── rspack.config.mjs # entry, swc loader, html plugin, native CSS
190
+ ├── tsconfig.json
191
+ └── src/
192
+ ├── main.tsx
193
+ ├── App.tsx
194
+ ├── index.css
195
+ └── components/author-credit.tsx
196
+ ```
197
+
198
+ ---
199
+
200
+ ## 👤 Author
201
+
202
+ Every template renders a small credit linking to the author. Built by **Javid Salimov** —
203
+ [GitHub](https://github.com/javidselimov) ·
204
+ [LinkedIn](https://www.linkedin.com/in/javidsalim/) ·
205
+ [npm](https://www.npmjs.com/~ubuligan).
206
+
207
+ ---
208
+
172
209
  ## 🎨 Adding shadcn/ui Components
173
210
 
174
- Both templates use shadcn/ui (new-york, lucide icons):
211
+ The React + Vite and Next.js templates use shadcn/ui (new-york, lucide icons):
175
212
 
176
213
  ```bash
177
214
  npx shadcn@latest add button
@@ -188,7 +225,7 @@ MIT
188
225
 
189
226
  ## 🔗 Links
190
227
 
191
- - [React](https://react.dev/) · [Next.js](https://nextjs.org/) · [Vite](https://vite.dev/)
228
+ - [React](https://react.dev/) · [Next.js](https://nextjs.org/) · [Vite](https://vite.dev/) · [Rspack](https://rspack.dev/)
192
229
  - [Tailwind CSS](https://tailwindcss.com/) · [shadcn/ui](https://ui.shadcn.com/)
193
230
  - [React Router](https://reactrouter.com/) · [TanStack Query](https://tanstack.com/query) · [orval](https://orval.dev/)
194
231
  - [Zustand](https://zustand.docs.pmnd.rs/) · [Recharts](https://recharts.org/) · [TypeScript](https://www.typescriptlang.org/)
package/index.js CHANGED
@@ -6,11 +6,29 @@ import { fileURLToPath } from "url";
6
6
  import { copy } from "fs-extra";
7
7
  import prompts from "prompts";
8
8
  import { execa } from "execa";
9
+ import figlet from "figlet";
9
10
 
10
11
  const __filename = fileURLToPath(import.meta.url);
11
12
  const __dirname = path.dirname(__filename);
12
13
 
14
+ // ANSI rəng köməkçiləri (xarici asılılıq olmadan)
15
+ const cyan = (s) => `\x1b[36m${s}\x1b[0m`;
16
+ const dim = (s) => `\x1b[2m${s}\x1b[0m`;
17
+
18
+ // 🧩 Banner — CLI açılışında göstərilir
19
+ const printBanner = () => {
20
+ try {
21
+ console.log(cyan(figlet.textSync("Reactivite", { font: "Standard" })));
22
+ } catch {
23
+ // figlet uğursuz olsa sadə mətnə keç
24
+ console.log(cyan("\n create-reactivite"));
25
+ }
26
+ console.log(dim(" Scaffold React / Next.js / Rspack apps · by Javid Salimov\n"));
27
+ };
28
+
13
29
  (async () => {
30
+ printBanner();
31
+
14
32
  const { projectName } = await prompts({
15
33
  type: "text",
16
34
  name: "projectName",
@@ -33,6 +51,10 @@ const __dirname = path.dirname(__filename);
33
51
  "Next.js 16 (App Router, i18n, TanStack Query, orval, Zustand, husky)",
34
52
  value: "template2",
35
53
  },
54
+ {
55
+ title: "Rspack (minimal React + TypeScript starter)",
56
+ value: "template3",
57
+ },
36
58
  ],
37
59
  initial: 0,
38
60
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-reactivite",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "⚡ Scaffold modern frontend projects in seconds — pick a template: React + Vite or Next.js 16 (App Router). Both ship Tailwind v4, shadcn/ui, TypeScript and a clean, production-ready structure. The Next.js template adds i18n, TanStack Query, axios/orval, Zustand, husky and Vitest. Zero setup hassle.",
5
5
  "bin": {
6
6
  "create-reactivite": "./index.js"
@@ -9,12 +9,14 @@
9
9
  "files": [
10
10
  "index.js",
11
11
  "template/",
12
- "template2/"
12
+ "template2/",
13
+ "template3/"
13
14
  ],
14
15
  "dependencies": {
15
16
  "prompts": "^2.4.2",
16
17
  "fs-extra": "^11.2.0",
17
- "execa": "^7.1.0"
18
+ "execa": "^7.1.0",
19
+ "figlet": "^1.9.3"
18
20
  },
19
21
  "repository": {
20
22
  "type": "git",
@@ -5,6 +5,7 @@ import { createBrowserRouter } from "react-router";
5
5
  import { RouterProvider } from "react-router/dom";
6
6
  import Home from './pages/Homepage/Homepage';
7
7
  import DashboardPage from './pages/Dashboard/Dashboard';
8
+ import { AuthorCredit } from './components/author-credit';
8
9
  const router = createBrowserRouter([
9
10
  {
10
11
  path: "/",
@@ -20,8 +21,12 @@ const router = createBrowserRouter([
20
21
  },
21
22
  ]);
22
23
  function App() {
23
- return <RouterProvider router={router} />
24
-
24
+ return (
25
+ <>
26
+ <RouterProvider router={router} />
27
+ <AuthorCredit />
28
+ </>
29
+ );
25
30
  }
26
31
 
27
32
  export default App
@@ -0,0 +1,25 @@
1
+ const links = [
2
+ { label: "GitHub", href: "https://github.com/javidselimov" },
3
+ { label: "LinkedIn", href: "https://www.linkedin.com/in/javidsalim/" },
4
+ { label: "npm", href: "https://www.npmjs.com/~ubuligan" },
5
+ ];
6
+
7
+ export function AuthorCredit() {
8
+ return (
9
+ <div className="fixed bottom-4 right-4 z-50 flex items-center gap-3 rounded-full border bg-background/80 px-4 py-2 text-sm shadow-lg backdrop-blur">
10
+ <span className="font-medium">Javid Salimov</span>
11
+ <span className="text-muted-foreground">·</span>
12
+ {links.map((l) => (
13
+ <a
14
+ key={l.label}
15
+ href={l.href}
16
+ target="_blank"
17
+ rel="noreferrer"
18
+ className="text-muted-foreground transition-colors hover:text-foreground"
19
+ >
20
+ {l.label}
21
+ </a>
22
+ ))}
23
+ </div>
24
+ );
25
+ }
@@ -9,6 +9,7 @@ import { TranslationProvider } from '@/contexts/translation-context';
9
9
  import { Toaster } from '@/components/ui/sonner';
10
10
  import { QueryProvider } from '@/hoc/provider';
11
11
  import { AuthEventListener } from '@/components/AuthEventListener';
12
+ import { AuthorCredit } from '@/components/author-credit';
12
13
  import { LOCALES, type Locale } from '@/config/constants';
13
14
  import { getDictionary } from './locales';
14
15
 
@@ -46,6 +47,7 @@ export default async function LocaleLayout({
46
47
  <TranslationProvider locale={locale} messages={messages}>
47
48
  <AuthEventListener />
48
49
  <Suspense fallback={null}>{children}</Suspense>
50
+ <AuthorCredit />
49
51
  </TranslationProvider>
50
52
  <Toaster />
51
53
  </ThemeProvider>
@@ -0,0 +1,25 @@
1
+ const links = [
2
+ { label: 'GitHub', href: 'https://github.com/javidselimov' },
3
+ { label: 'LinkedIn', href: 'https://www.linkedin.com/in/javidsalim/' },
4
+ { label: 'npm', href: 'https://www.npmjs.com/~ubuligan' },
5
+ ];
6
+
7
+ export function AuthorCredit() {
8
+ return (
9
+ <div className="fixed bottom-4 right-4 z-50 flex items-center gap-3 rounded-full border bg-background/80 px-4 py-2 text-sm shadow-lg backdrop-blur">
10
+ <span className="font-medium">Javid Salimov</span>
11
+ <span className="text-muted-foreground">·</span>
12
+ {links.map((l) => (
13
+ <a
14
+ key={l.label}
15
+ href={l.href}
16
+ target="_blank"
17
+ rel="noreferrer"
18
+ className="text-muted-foreground transition-colors hover:text-foreground"
19
+ >
20
+ {l.label}
21
+ </a>
22
+ ))}
23
+ </div>
24
+ );
25
+ }