nextworks 0.1.0-alpha.9 → 0.2.0-alpha.2
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 +123 -149
- package/dist/cli_manifests/blocks_manifest.json +8 -0
- package/dist/commands/blocks.d.ts +2 -0
- package/dist/commands/blocks.d.ts.map +1 -1
- package/dist/commands/blocks.js +188 -20
- package/dist/commands/blocks.js.map +1 -1
- package/dist/index.js +4 -24
- package/dist/index.js.map +1 -1
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +19 -18
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +21 -11
- package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +30 -2
- package/dist/kits/blocks/LICENSE +1 -1
- package/dist/kits/blocks/app/globals.css +1 -1
- package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +1 -1
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +0 -2
- package/dist/kits/blocks/app/tw-animate.css +257 -0
- package/dist/kits/blocks/components/app-providers.app.tsx +17 -0
- package/dist/kits/blocks/components/app-providers.pages.tsx +12 -0
- package/dist/kits/blocks/components/app-providers.tsx +1 -1
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +183 -195
- package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -0
- package/dist/kits/blocks/components/sections/FAQ.tsx +0 -1
- package/dist/kits/blocks/components/sections/Features.tsx +6 -5
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +5 -4
- package/dist/kits/blocks/components/sections/Newsletter.tsx +2 -2
- package/dist/kits/blocks/components/ui/switch.tsx +78 -78
- package/dist/kits/blocks/components/ui/theme-selector.tsx +2 -2
- package/dist/kits/blocks/lib/themes.ts +1 -0
- package/dist/kits/blocks/lib/utils.ts +1 -1
- package/dist/kits/blocks/package-deps.json +11 -5
- package/dist/utils/file-operations.d.ts +4 -0
- package/dist/utils/file-operations.d.ts.map +1 -1
- package/dist/utils/file-operations.js +428 -13
- package/dist/utils/file-operations.js.map +1 -1
- package/dist/utils/next-pages-document.d.ts +3 -0
- package/dist/utils/next-pages-document.d.ts.map +1 -0
- package/dist/utils/next-pages-document.js +48 -0
- package/dist/utils/next-pages-document.js.map +1 -0
- package/package.json +51 -54
- package/dist/cli_manifests/auth_manifest.json +0 -92
- package/dist/cli_manifests/data_manifest.json +0 -53
- package/dist/cli_manifests/forms_manifest.json +0 -64
- package/dist/commands/admin-posts.d.ts +0 -2
- package/dist/commands/admin-posts.d.ts.map +0 -1
- package/dist/commands/admin-posts.js +0 -15
- package/dist/commands/admin-posts.js.map +0 -1
- package/dist/commands/admin-users.d.ts +0 -2
- package/dist/commands/admin-users.d.ts.map +0 -1
- package/dist/commands/admin-users.js +0 -15
- package/dist/commands/admin-users.js.map +0 -1
- package/dist/commands/auth-core.d.ts +0 -2
- package/dist/commands/auth-core.d.ts.map +0 -1
- package/dist/commands/auth-core.js +0 -83
- package/dist/commands/auth-core.js.map +0 -1
- package/dist/commands/auth-forms.d.ts +0 -2
- package/dist/commands/auth-forms.d.ts.map +0 -1
- package/dist/commands/auth-forms.js +0 -15
- package/dist/commands/auth-forms.js.map +0 -1
- package/dist/commands/data.d.ts +0 -3
- package/dist/commands/data.d.ts.map +0 -1
- package/dist/commands/data.js +0 -88
- package/dist/commands/data.js.map +0 -1
- package/dist/commands/forms.d.ts +0 -6
- package/dist/commands/forms.d.ts.map +0 -1
- package/dist/commands/forms.js +0 -107
- package/dist/commands/forms.js.map +0 -1
- package/dist/commands/remove-auth-core.d.ts +0 -2
- package/dist/commands/remove-auth-core.d.ts.map +0 -1
- package/dist/commands/remove-auth-core.js +0 -69
- package/dist/commands/remove-auth-core.js.map +0 -1
- package/dist/kits/auth-core/.nextworks/docs/AUTH_CORE_README.md +0 -117
- package/dist/kits/auth-core/.nextworks/docs/AUTH_QUICKSTART.md +0 -244
- package/dist/kits/auth-core/LICENSE +0 -21
- package/dist/kits/auth-core/app/(protected)/admin/posts/page.tsx +0 -29
- package/dist/kits/auth-core/app/(protected)/admin/users/page.tsx +0 -29
- package/dist/kits/auth-core/app/(protected)/dashboard/page.tsx +0 -8
- package/dist/kits/auth-core/app/(protected)/layout.tsx +0 -18
- package/dist/kits/auth-core/app/(protected)/settings/profile/page.tsx +0 -15
- package/dist/kits/auth-core/app/(protected)/settings/profile/profile-form.tsx +0 -114
- package/dist/kits/auth-core/app/api/auth/[...nextauth]/route.ts +0 -1
- package/dist/kits/auth-core/app/api/auth/forgot-password/route.ts +0 -114
- package/dist/kits/auth-core/app/api/auth/providers/route.ts +0 -6
- package/dist/kits/auth-core/app/api/auth/reset-password/route.ts +0 -63
- package/dist/kits/auth-core/app/api/auth/send-verify-email/route.ts +0 -6
- package/dist/kits/auth-core/app/api/signup/route.ts +0 -41
- package/dist/kits/auth-core/app/api/users/[id]/route.ts +0 -127
- package/dist/kits/auth-core/app/auth/forgot-password/page.tsx +0 -21
- package/dist/kits/auth-core/app/auth/login/page.tsx +0 -5
- package/dist/kits/auth-core/app/auth/reset-password/page.tsx +0 -187
- package/dist/kits/auth-core/app/auth/signup/page.tsx +0 -5
- package/dist/kits/auth-core/app/auth/verify-email/page.tsx +0 -11
- package/dist/kits/auth-core/components/admin/admin-header.tsx +0 -57
- package/dist/kits/auth-core/components/auth/dashboard.tsx +0 -237
- package/dist/kits/auth-core/components/auth/forgot-password-form.tsx +0 -90
- package/dist/kits/auth-core/components/auth/login-form.tsx +0 -467
- package/dist/kits/auth-core/components/auth/logout-button.tsx +0 -50
- package/dist/kits/auth-core/components/auth/minimal-logout-button.tsx +0 -40
- package/dist/kits/auth-core/components/auth/signup-form.tsx +0 -468
- package/dist/kits/auth-core/components/require-auth.tsx +0 -59
- package/dist/kits/auth-core/components/session-provider.tsx +0 -11
- package/dist/kits/auth-core/components/ui/README.txt +0 -1
- package/dist/kits/auth-core/components/ui/button.tsx +0 -122
- package/dist/kits/auth-core/components/ui/input.tsx +0 -27
- package/dist/kits/auth-core/components/ui/label.tsx +0 -29
- package/dist/kits/auth-core/lib/api/errors.ts +0 -14
- package/dist/kits/auth-core/lib/auth-helpers.ts +0 -29
- package/dist/kits/auth-core/lib/auth.ts +0 -142
- package/dist/kits/auth-core/lib/email/dev-transport.ts +0 -42
- package/dist/kits/auth-core/lib/email/index.ts +0 -28
- package/dist/kits/auth-core/lib/email/provider-smtp.ts +0 -36
- package/dist/kits/auth-core/lib/forms/map-errors.ts +0 -11
- package/dist/kits/auth-core/lib/hash.ts +0 -6
- package/dist/kits/auth-core/lib/prisma.ts +0 -15
- package/dist/kits/auth-core/lib/server/result.ts +0 -45
- package/dist/kits/auth-core/lib/utils.ts +0 -6
- package/dist/kits/auth-core/lib/validation/forms.ts +0 -88
- package/dist/kits/auth-core/package-deps.json +0 -19
- package/dist/kits/auth-core/prisma/auth-models.prisma +0 -81
- package/dist/kits/auth-core/prisma/schema.prisma +0 -81
- package/dist/kits/auth-core/scripts/populate-tokenhash.mjs +0 -26
- package/dist/kits/auth-core/scripts/promote-admin.mjs +0 -33
- package/dist/kits/auth-core/scripts/seed-demo.mjs +0 -40
- package/dist/kits/auth-core/types/next-auth.d.ts +0 -25
- package/dist/kits/data/.gitkeep +0 -0
- package/dist/kits/data/.nextworks/docs/DATA_QUICKSTART.md +0 -112
- package/dist/kits/data/.nextworks/docs/DATA_README.md +0 -117
- package/dist/kits/data/LICENSE +0 -21
- package/dist/kits/data/app/(protected)/admin/posts/page.tsx +0 -5
- package/dist/kits/data/app/(protected)/admin/users/page.tsx +0 -5
- package/dist/kits/data/app/api/posts/[id]/route.ts +0 -83
- package/dist/kits/data/app/api/posts/route.ts +0 -138
- package/dist/kits/data/app/api/seed-demo/route.ts +0 -45
- package/dist/kits/data/app/api/users/[id]/route.ts +0 -127
- package/dist/kits/data/app/api/users/check-email/route.ts +0 -18
- package/dist/kits/data/app/api/users/check-unique/route.ts +0 -27
- package/dist/kits/data/app/api/users/route.ts +0 -79
- package/dist/kits/data/app/examples/demo/README.md +0 -4
- package/dist/kits/data/app/examples/demo/create-post-form.tsx +0 -106
- package/dist/kits/data/app/examples/demo/page.tsx +0 -118
- package/dist/kits/data/app/examples/demo/seed-demo-button.tsx +0 -37
- package/dist/kits/data/components/admin/posts-manager.tsx +0 -719
- package/dist/kits/data/components/admin/users-manager.tsx +0 -432
- package/dist/kits/data/lib/prisma.ts +0 -15
- package/dist/kits/data/lib/server/result.ts +0 -90
- package/dist/kits/data/package-deps.json +0 -11
- package/dist/kits/data/scripts/seed-demo.mjs +0 -41
- package/dist/kits/forms/.gitkeep +0 -0
- package/dist/kits/forms/.nextworks/docs/FORMS_QUICKSTART.md +0 -85
- package/dist/kits/forms/.nextworks/docs/FORMS_README.md +0 -61
- package/dist/kits/forms/LICENSE +0 -21
- package/dist/kits/forms/app/.gitkeep +0 -0
- package/dist/kits/forms/app/api/wizard/route.ts +0 -71
- package/dist/kits/forms/app/examples/forms/basic/page.tsx +0 -124
- package/dist/kits/forms/app/examples/forms/server-action/form-client.tsx +0 -28
- package/dist/kits/forms/app/examples/forms/server-action/page.tsx +0 -71
- package/dist/kits/forms/app/examples/forms/wizard/page.tsx +0 -15
- package/dist/kits/forms/app/examples/forms/wizard/wizard-client.tsx +0 -2
- package/dist/kits/forms/components/.gitkeep +0 -0
- package/dist/kits/forms/components/examples/wizard-client.tsx +0 -231
- package/dist/kits/forms/components/hooks/useCheckUnique.ts +0 -79
- package/dist/kits/forms/components/ui/button.tsx +0 -122
- package/dist/kits/forms/components/ui/checkbox.tsx +0 -30
- package/dist/kits/forms/components/ui/form/context.ts +0 -33
- package/dist/kits/forms/components/ui/form/form-control.tsx +0 -28
- package/dist/kits/forms/components/ui/form/form-description.tsx +0 -22
- package/dist/kits/forms/components/ui/form/form-field.tsx +0 -36
- package/dist/kits/forms/components/ui/form/form-item.tsx +0 -21
- package/dist/kits/forms/components/ui/form/form-label.tsx +0 -24
- package/dist/kits/forms/components/ui/form/form-message.tsx +0 -29
- package/dist/kits/forms/components/ui/form/form.tsx +0 -26
- package/dist/kits/forms/components/ui/input.tsx +0 -27
- package/dist/kits/forms/components/ui/label.tsx +0 -29
- package/dist/kits/forms/components/ui/select.tsx +0 -25
- package/dist/kits/forms/components/ui/switch.tsx +0 -78
- package/dist/kits/forms/components/ui/textarea.tsx +0 -26
- package/dist/kits/forms/lib/.gitkeep +0 -0
- package/dist/kits/forms/lib/forms/map-errors.ts +0 -29
- package/dist/kits/forms/lib/prisma.ts +0 -16
- package/dist/kits/forms/lib/utils.ts +0 -9
- package/dist/kits/forms/lib/validation/forms.ts +0 -88
- package/dist/kits/forms/lib/validation/wizard.ts +0 -32
- package/dist/kits/forms/package-deps.json +0 -17
package/README.md
CHANGED
|
@@ -3,154 +3,155 @@
|
|
|
3
3
|
Nextworks is a CLI that installs **modular Next.js building blocks** into your app:
|
|
4
4
|
|
|
5
5
|
- **Blocks** – UI sections, templates, and core UI primitives.
|
|
6
|
-
- **Auth Core** – Email/password auth (NextAuth + Prisma), basic dashboard, and helpers.
|
|
7
|
-
- **Forms** – Opinionated form primitives built on React Hook Form + Zod.
|
|
8
|
-
- **Data** – Example CRUD for Users + Posts with admin UI, wired to Auth + Prisma.
|
|
9
6
|
|
|
10
7
|
> **Status:** early‑access alpha. Expect rough edges and breaking changes between alpha releases.
|
|
11
8
|
>
|
|
12
|
-
>
|
|
9
|
+
> **Package manager:** npm only (for now).
|
|
13
10
|
>
|
|
14
|
-
>
|
|
15
|
-
>
|
|
16
|
-
>
|
|
11
|
+
> In this alpha, the most reliable setup is:
|
|
12
|
+
>
|
|
13
|
+
> 1. Create a new Next.js project (App Router **or** Pages Router):
|
|
14
|
+
>
|
|
15
|
+
> ```bash
|
|
16
|
+
> npx create-next-app@latest
|
|
17
|
+
> ```
|
|
18
|
+
>
|
|
19
|
+
> 2. From your app root, install **Blocks**:
|
|
20
|
+
>
|
|
21
|
+
> ```bash
|
|
22
|
+
> npx nextworks@latest add blocks --sections --templates
|
|
23
|
+
> ```
|
|
17
24
|
>
|
|
18
|
-
>
|
|
25
|
+
> Non-interactive / CI-friendly:
|
|
26
|
+
>
|
|
27
|
+
> ```bash
|
|
28
|
+
> npx nextworks@latest add blocks --sections --templates --yes
|
|
29
|
+
> ```
|
|
30
|
+
>
|
|
31
|
+
> 3. Optionally, adjust flags to install only what you want (UI-only, sections, templates).
|
|
19
32
|
|
|
20
33
|
---
|
|
21
34
|
|
|
22
|
-
##
|
|
35
|
+
## Safety (read this first)
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
`nextworks` installs kits by copying files into your Next.js project. If a destination path already exists, kit installs may **overwrite** your files.
|
|
25
38
|
|
|
26
|
-
|
|
39
|
+
Before running installs, strongly consider:
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
- **Commit first**, then install:
|
|
42
|
+
- `git add -A && git commit -m "baseline"`
|
|
43
|
+
- Review changes after install:
|
|
44
|
+
- `git diff --name-status`
|
|
45
|
+
- To undo everything quickly:
|
|
46
|
+
- `git reset --hard`
|
|
47
|
+
- (optional) remove untracked files created by installs: `git clean -fd`
|
|
31
48
|
|
|
32
|
-
|
|
49
|
+
Kits may also:
|
|
33
50
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
- **merge dependencies** into `package.json`
|
|
52
|
+
- **edit your router entrypoint** (Blocks):
|
|
53
|
+
- App Router: `app/layout.tsx`
|
|
54
|
+
- Pages Router: `pages/_app.tsx` (and may create/update `pages/_document.tsx`)
|
|
55
|
+
- create/update `.nextworks/config.json`
|
|
37
56
|
|
|
38
|
-
|
|
57
|
+
For a transparent breakdown of what each kit writes/edits, see:
|
|
39
58
|
|
|
40
|
-
|
|
41
|
-
npx nextworks add blocks --sections --templates
|
|
42
|
-
npx nextworks add auth-core
|
|
43
|
-
npx nextworks add forms
|
|
44
|
-
npx nextworks add data
|
|
45
|
-
```
|
|
59
|
+
- https://github.com/jblh/nextworks-cli/blob/main/docs/FILE_CHANGES.md
|
|
46
60
|
|
|
47
61
|
---
|
|
48
62
|
|
|
49
|
-
##
|
|
63
|
+
## Feedback
|
|
50
64
|
|
|
51
|
-
|
|
65
|
+
Nextworks is early‑access alpha and I’m actively looking for feedback from early testers.
|
|
52
66
|
|
|
53
|
-
|
|
54
|
-
- TypeScript + Tailwind recommended.
|
|
55
|
-
- A **PostgreSQL database** if you plan to use **Auth Core** and **Data**.
|
|
56
|
-
- The kits are designed and tested with Postgres using a database hosted on [Neon](https://neon.tech/).
|
|
67
|
+
### Where to post feedback
|
|
57
68
|
|
|
58
|
-
|
|
69
|
+
- **Start here (installation + where to post feedback):** https://github.com/jblh/nextworks-cli/discussions/1
|
|
70
|
+
- **Alpha feedback thread (what broke / what’s missing):** https://github.com/jblh/nextworks-cli/discussions/2
|
|
59
71
|
|
|
60
|
-
###
|
|
72
|
+
### Bug reports
|
|
61
73
|
|
|
62
|
-
|
|
63
|
-
npx nextworks add blocks --sections --templates
|
|
64
|
-
```
|
|
74
|
+
For reproducible bugs / errors (especially install/runtime issues), please open a GitHub Issue using the templates in `.github/ISSUE_TEMPLATE/`.
|
|
65
75
|
|
|
66
|
-
|
|
76
|
+
### Private contact (optional)
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
- `components/sections/*` (reusable sections)
|
|
70
|
-
- Page templates under `app/templates/*`
|
|
71
|
-
- Theme helpers and `app/globals.css` (if not already present)
|
|
78
|
+
If you need to share something privately (e.g. security-related), email: nextjsworks@gmail.com
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
---
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
- `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`
|
|
82
|
+
## Install and run the CLI
|
|
77
83
|
|
|
78
|
-
|
|
84
|
+
From your Next.js app root, use `npx`:
|
|
79
85
|
|
|
80
86
|
```bash
|
|
81
|
-
npx nextworks
|
|
87
|
+
npx nextworks@latest --help
|
|
82
88
|
```
|
|
83
89
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
1. Copy and edit your environment variables:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
cp .env.example .env
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Set at minimum:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
DATABASE_URL=postgres://...
|
|
96
|
-
NEXTAUTH_URL=http://localhost:3000
|
|
97
|
-
NEXTAUTH_SECRET=your-strong-secret
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
2. Install Prisma (if you haven’t already):
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npm install @prisma/client prisma
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
3. Run Prisma:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npx prisma generate
|
|
110
|
-
npx prisma migrate dev -n init
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Start your dev server:
|
|
90
|
+
Example commands:
|
|
114
91
|
|
|
115
92
|
```bash
|
|
116
|
-
|
|
93
|
+
npx nextworks@latest add blocks --sections --templates
|
|
94
|
+
npx nextworks@latest add blocks --sections --templates --yes # non-interactive / CI
|
|
117
95
|
```
|
|
118
96
|
|
|
119
|
-
|
|
97
|
+
---
|
|
120
98
|
|
|
121
|
-
|
|
122
|
-
- `/auth/login`
|
|
123
|
-
- `/dashboard` (protected)
|
|
99
|
+
## Getting started in an existing Next.js app
|
|
124
100
|
|
|
125
|
-
|
|
101
|
+
Prerequisites:
|
|
126
102
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
103
|
+
- A Next.js project (App Router **or** Pages Router).
|
|
104
|
+
- TypeScript required.
|
|
105
|
+
- Tailwind CSS required (the Blocks kit and templates rely on Tailwind classes).
|
|
130
106
|
|
|
131
|
-
|
|
107
|
+
From your app root:
|
|
132
108
|
|
|
133
|
-
|
|
134
|
-
- `/examples/forms/server-action`
|
|
135
|
-
- `/examples/forms/wizard`
|
|
109
|
+
### 1) Install Blocks (UI kit)
|
|
136
110
|
|
|
137
|
-
|
|
111
|
+
Non-interactive / CI-friendly (auto-accept defaults where possible):
|
|
138
112
|
|
|
139
113
|
```bash
|
|
140
|
-
npx nextworks add
|
|
114
|
+
npx nextworks@latest add blocks --sections --templates --yes
|
|
141
115
|
```
|
|
142
116
|
|
|
143
|
-
|
|
117
|
+
> **Turbopack / Next 16 note (fonts + AppProviders)**
|
|
118
|
+
>
|
|
119
|
+
> Shared packages intentionally avoid importing `next/font/*`.
|
|
120
|
+
> Fonts are configured directly in your app’s router entrypoint (the CLI patches this for you):
|
|
121
|
+
>
|
|
122
|
+
> - App Router: `app/layout.tsx`
|
|
123
|
+
> - Pages Router: `pages/_app.tsx`
|
|
124
|
+
> This avoids Turbopack dev issues related to internal Next font modules.
|
|
125
|
+
>
|
|
126
|
+
> If you ever see a font-related Turbopack error after upgrades or manual edits, re-run:
|
|
127
|
+
>
|
|
128
|
+
> ```bash
|
|
129
|
+
> npx nextworks@latest add blocks --sections --templates
|
|
130
|
+
> ```
|
|
131
|
+
>
|
|
132
|
+
> to re-apply the patch, and ensure your router entrypoint contains a valid
|
|
133
|
+
> `import { ... } from "next/font/google";` plus the corresponding `const geistSans = ...` etc.
|
|
134
|
+
>
|
|
135
|
+
> - App Router: `app/layout.tsx`
|
|
136
|
+
> - Pages Router: `pages/_app.tsx`
|
|
144
137
|
|
|
145
138
|
```bash
|
|
146
|
-
npx
|
|
147
|
-
npx prisma migrate dev
|
|
139
|
+
npx nextworks@latest add blocks --sections --templates
|
|
148
140
|
```
|
|
149
141
|
|
|
150
|
-
|
|
142
|
+
This copies:
|
|
143
|
+
|
|
144
|
+
- `components/ui/*` (core UI primitives)
|
|
145
|
+
- `components/sections/*` (reusable sections)
|
|
146
|
+
- Templates (router-native):
|
|
147
|
+
- App Router projects: `app/templates/*`
|
|
148
|
+
- Pages Router projects: `pages/templates/<template>/index.tsx`
|
|
149
|
+
- Theme helpers and `app/globals.css` (if not already present)
|
|
150
|
+
|
|
151
|
+
After this step you should be able to start your dev server and visit:
|
|
151
152
|
|
|
152
|
-
-
|
|
153
|
-
- `/
|
|
153
|
+
- `/` (if wired as the home page), or
|
|
154
|
+
- `/templates/productlaunch`, `/templates/saasdashboard`, `/templates/digitalagency`
|
|
154
155
|
|
|
155
156
|
---
|
|
156
157
|
|
|
@@ -159,15 +160,21 @@ Then visit:
|
|
|
159
160
|
For a full UI kit including core primitives, sections, and templates, use:
|
|
160
161
|
|
|
161
162
|
```bash
|
|
162
|
-
npx nextworks add blocks --sections --templates
|
|
163
|
+
npx nextworks@latest add blocks --sections --templates
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Non-interactive / CI-friendly:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npx nextworks@latest add blocks --sections --templates --yes
|
|
163
170
|
```
|
|
164
171
|
|
|
165
172
|
If you want finer control:
|
|
166
173
|
|
|
167
|
-
- `npx nextworks add blocks --ui-only` – install core UI primitives only (no sections/templates).
|
|
168
|
-
- `npx nextworks add blocks --sections` – install core + sections only.
|
|
169
|
-
- `npx nextworks add blocks --templates` – install core + templates only.
|
|
170
|
-
- `npx nextworks add blocks --sections --templates` – install core + sections + templates.
|
|
174
|
+
- `npx nextworks@latest add blocks --ui-only` – install core UI primitives only (no sections/templates).
|
|
175
|
+
- `npx nextworks@latest add blocks --sections` – install core + sections only.
|
|
176
|
+
- `npx nextworks@latest add blocks --templates` – install core + templates only.
|
|
177
|
+
- `npx nextworks@latest add blocks --sections --templates` – install core + sections + templates.
|
|
171
178
|
|
|
172
179
|
---
|
|
173
180
|
|
|
@@ -176,41 +183,29 @@ If you want finer control:
|
|
|
176
183
|
You can add a short “Nextworks setup” section to your app README:
|
|
177
184
|
|
|
178
185
|
```md
|
|
179
|
-
### Nextworks setup (Blocks
|
|
186
|
+
### Nextworks setup (Blocks)
|
|
180
187
|
|
|
181
188
|
1. Install and run the CLI from your Next.js app root:
|
|
182
189
|
|
|
183
|
-
npx nextworks add blocks --sections --templates
|
|
184
|
-
npx nextworks add auth-core
|
|
185
|
-
|
|
186
|
-
2. Copy environment variables:
|
|
187
|
-
|
|
188
|
-
cp .env.example .env
|
|
189
|
-
|
|
190
|
-
Set DATABASE_URL, NEXTAUTH_URL, NEXTAUTH_SECRET (and any OAuth or email provider vars you need).
|
|
191
|
-
|
|
192
|
-
3. Install Prisma (if not present) and run migrations:
|
|
190
|
+
npx nextworks@latest add blocks --sections --templates
|
|
193
191
|
|
|
194
|
-
|
|
195
|
-
npx prisma generate
|
|
196
|
-
npx prisma migrate dev -n init
|
|
192
|
+
# CI / non-interactive:
|
|
197
193
|
|
|
198
|
-
|
|
194
|
+
npx nextworks@latest add blocks --sections --templates --yes
|
|
199
195
|
|
|
200
|
-
|
|
201
|
-
npx nextworks add data
|
|
202
|
-
npx prisma generate
|
|
203
|
-
npx prisma migrate dev -n init_data
|
|
204
|
-
|
|
205
|
-
5. Start dev server:
|
|
196
|
+
2. Start dev server:
|
|
206
197
|
|
|
207
198
|
npm run dev
|
|
208
199
|
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
- `/
|
|
212
|
-
- `/
|
|
213
|
-
- `/
|
|
200
|
+
3. Try these routes:
|
|
201
|
+
- `/templates/productlaunch`
|
|
202
|
+
- `/templates/saasdashboard`
|
|
203
|
+
- `/templates/digitalagency`
|
|
204
|
+
- `/templates/gallery`
|
|
205
|
+
|
|
206
|
+
Template files live at:
|
|
207
|
+
- App Router: `app/templates/...`
|
|
208
|
+
- Pages Router: `pages/templates/<template>/index.tsx`
|
|
214
209
|
```
|
|
215
210
|
|
|
216
211
|
---
|
|
@@ -228,27 +223,6 @@ the MIT License.
|
|
|
228
223
|
|
|
229
224
|
## Troubleshooting
|
|
230
225
|
|
|
231
|
-
- **Prisma errors or missing migrations**
|
|
232
|
-
|
|
233
|
-
Ensure you’ve run:
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
npx prisma generate
|
|
237
|
-
npx prisma migrate dev
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
and that `DATABASE_URL` in `.env` points to a reachable PostgreSQL instance.
|
|
241
|
-
|
|
242
|
-
- **Auth routes 404**
|
|
243
|
-
|
|
244
|
-
Make sure you ran:
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
npx nextworks add auth-core
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
from your app root, and restart your dev server.
|
|
251
|
-
|
|
252
226
|
- **Type errors from imported components**
|
|
253
227
|
|
|
254
228
|
Confirm your project is using TypeScript and that your TypeScript config picks up the new `components/` and `lib/` paths.
|
|
@@ -27,11 +27,15 @@
|
|
|
27
27
|
"components/ui/theme-toggle.tsx",
|
|
28
28
|
"components/ui/toaster.tsx",
|
|
29
29
|
"components/enhanced-theme-provider.tsx",
|
|
30
|
+
"components/providers/BlocksAppProviders.tsx",
|
|
30
31
|
"components/app-providers.tsx",
|
|
32
|
+
"components/app-providers.app.tsx",
|
|
33
|
+
"components/app-providers.pages.tsx",
|
|
31
34
|
"components/theme-provider.tsx",
|
|
32
35
|
"lib/themes.ts",
|
|
33
36
|
"lib/utils.ts",
|
|
34
37
|
"app/globals.css",
|
|
38
|
+
"app/tw-animate.css",
|
|
35
39
|
"next.config.ts",
|
|
36
40
|
".nextworks/docs/THEME_GUIDE.md",
|
|
37
41
|
".nextworks/docs/BLOCKS_README.md",
|
|
@@ -85,11 +89,15 @@
|
|
|
85
89
|
"components/ui/theme-toggle.tsx",
|
|
86
90
|
"components/ui/toaster.tsx",
|
|
87
91
|
"components/enhanced-theme-provider.tsx",
|
|
92
|
+
"components/providers/BlocksAppProviders.tsx",
|
|
88
93
|
"components/app-providers.tsx",
|
|
94
|
+
"components/app-providers.app.tsx",
|
|
95
|
+
"components/app-providers.pages.tsx",
|
|
89
96
|
"components/theme-provider.tsx",
|
|
90
97
|
"lib/themes.ts",
|
|
91
98
|
"lib/utils.ts",
|
|
92
99
|
"app/globals.css",
|
|
100
|
+
"app/tw-animate.css",
|
|
93
101
|
"next.config.ts",
|
|
94
102
|
|
|
95
103
|
"app/templates/productlaunch/page.tsx",
|
|
@@ -3,6 +3,8 @@ export interface AddBlocksOptions {
|
|
|
3
3
|
templates?: boolean;
|
|
4
4
|
gallery?: boolean;
|
|
5
5
|
uiOnly?: boolean;
|
|
6
|
+
/** Skip interactive prompts and accept defaults. */
|
|
7
|
+
yes?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export declare function addBlocks(options?: AddBlocksOptions): Promise<void>;
|
|
8
10
|
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/commands/blocks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/commands/blocks.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAya7E"}
|
package/dist/commands/blocks.js
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
@@ -143,29 +176,88 @@ async function addBlocks(options = {}) {
|
|
|
143
176
|
await (0, installation_tracker_1.addInstalledKit)("blocks", Object.keys(deps.dependencies || {}), Object.keys(deps.devDependencies || {}), filesToCopy);
|
|
144
177
|
console.log("✓ blocks kit installed successfully!");
|
|
145
178
|
let layoutUpgraded = false;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
179
|
+
let pagesAppUpgraded = false;
|
|
180
|
+
// Offer to auto-upgrade the root layout to use AppProviders (App Router)
|
|
181
|
+
// (supports both root app/layout.tsx and src/app/layout.tsx)
|
|
182
|
+
const mode = await (0, file_operations_1.detectProjectRootMode)(process.cwd());
|
|
183
|
+
const detectedLayoutPath = mode === "src" ? "src/app/layout.tsx" : "app/layout.tsx";
|
|
184
|
+
const detectedPagesAppPath = mode === "src" ? "src/pages/_app.tsx" : "pages/_app.tsx";
|
|
185
|
+
// Dynamically load inquirer to avoid ESM/CJS interop issues when
|
|
186
|
+
// the CLI is compiled to CommonJS but inquirer is ESM-only.
|
|
187
|
+
let promptFn;
|
|
188
|
+
try {
|
|
189
|
+
// Use a runtime dynamic import via the Function constructor to ensure
|
|
190
|
+
// we call the native import() at runtime and avoid TypeScript
|
|
191
|
+
// transpilation turning this into a require() call.
|
|
192
|
+
const inquirerModule = await new Function('return import("inquirer")')();
|
|
193
|
+
// inquirer exports a default object with prompt; support both shapes
|
|
194
|
+
promptFn = inquirerModule?.default?.prompt ?? inquirerModule?.prompt;
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
console.log("⚠️ Could not load optional interactive prompt (inquirer). Skipping optional layout/_app upgrades.");
|
|
198
|
+
promptFn = null;
|
|
199
|
+
}
|
|
200
|
+
const appRouterLayoutExists = await (0, file_operations_1.fileExists)(detectedLayoutPath);
|
|
201
|
+
const pagesRouterAppExists = await (0, file_operations_1.fileExists)(detectedPagesAppPath);
|
|
202
|
+
// Hybrid projects (common with create-next-app) may have both /app and /pages.
|
|
203
|
+
// In that case we should patch BOTH entrypoints so routes in either router
|
|
204
|
+
// are wrapped with providers.
|
|
205
|
+
if (appRouterLayoutExists && pagesRouterAppExists) {
|
|
151
206
|
try {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// transpilation turning this into a require() call.
|
|
155
|
-
const inquirerModule = await new Function('return import("inquirer")')();
|
|
156
|
-
// inquirer exports a default object with prompt; support both shapes
|
|
157
|
-
promptFn = inquirerModule?.default?.prompt ?? inquirerModule?.prompt;
|
|
207
|
+
await (0, file_operations_1.updateLayoutWithAppProviders)();
|
|
208
|
+
layoutUpgraded = true;
|
|
158
209
|
}
|
|
159
210
|
catch (err) {
|
|
160
|
-
console.log("⚠️
|
|
161
|
-
|
|
211
|
+
console.log("⚠️ Failed to update app/layout.tsx automatically:", err);
|
|
212
|
+
}
|
|
213
|
+
try {
|
|
214
|
+
await (0, file_operations_1.updatePagesAppWithAppProviders)();
|
|
215
|
+
await (0, file_operations_1.ensurePagesDocumentSuppressHydrationWarning)();
|
|
216
|
+
// Ensure pages/_app.tsx uses the Pages-safe AppProviders implementation.
|
|
217
|
+
const candidatePagesAppProvidersPaths = [
|
|
218
|
+
"components/app-providers.pages.tsx",
|
|
219
|
+
"src/components/app-providers.pages.tsx",
|
|
220
|
+
];
|
|
221
|
+
for (const appProvidersPath of candidatePagesAppProvidersPaths) {
|
|
222
|
+
if (await (0, file_operations_1.fileExists)(appProvidersPath)) {
|
|
223
|
+
const fsExtraModule = await Promise.resolve().then(() => __importStar(require("fs-extra")));
|
|
224
|
+
await fsExtraModule.default.writeFile(appProvidersPath, "\"use client\";\n\nimport * as React from \"react\";\n\nimport { BlocksAppProviders } from \"./providers/BlocksAppProviders\";\n\nexport default function AppProviders({ children }: { children: React.ReactNode }) {\n return (\n <div className=\"antialiased\">\n <BlocksAppProviders>{children}</BlocksAppProviders>\n </div>\n );\n}\n");
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
// Ensure root components/app-providers.tsx points to the App Router variant
|
|
228
|
+
// so app/layout.tsx imports the correct implementation.
|
|
229
|
+
const candidateRootAppProvidersPaths = [
|
|
230
|
+
"components/app-providers.tsx",
|
|
231
|
+
"src/components/app-providers.tsx",
|
|
232
|
+
];
|
|
233
|
+
for (const appProvidersPath of candidateRootAppProvidersPaths) {
|
|
234
|
+
if (await (0, file_operations_1.fileExists)(appProvidersPath)) {
|
|
235
|
+
const fsExtraModule = await Promise.resolve().then(() => __importStar(require("fs-extra")));
|
|
236
|
+
await fsExtraModule.default.writeFile(appProvidersPath, 'export { default } from "./app-providers.app";\n');
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
pagesAppUpgraded = true;
|
|
162
240
|
}
|
|
163
|
-
|
|
241
|
+
catch (err) {
|
|
242
|
+
console.log("⚠️ Failed to update pages/_app.tsx automatically:", err);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
else if (appRouterLayoutExists) {
|
|
246
|
+
if (options.yes) {
|
|
247
|
+
try {
|
|
248
|
+
await (0, file_operations_1.updateLayoutWithAppProviders)();
|
|
249
|
+
layoutUpgraded = true;
|
|
250
|
+
}
|
|
251
|
+
catch (err) {
|
|
252
|
+
console.log("⚠️ Failed to update app/layout.tsx automatically:", err);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else if (promptFn) {
|
|
164
256
|
const { upgradeLayout } = await promptFn([
|
|
165
257
|
{
|
|
166
258
|
type: "confirm",
|
|
167
259
|
name: "upgradeLayout",
|
|
168
|
-
message:
|
|
260
|
+
message: `Would you like the CLI to automatically wrap your ${detectedLayoutPath} with AppProviders and add suppressHydrationWarning to the <html> tag?`,
|
|
169
261
|
default: true,
|
|
170
262
|
},
|
|
171
263
|
]);
|
|
@@ -180,21 +272,97 @@ async function addBlocks(options = {}) {
|
|
|
180
272
|
}
|
|
181
273
|
}
|
|
182
274
|
}
|
|
275
|
+
else if (await (0, file_operations_1.fileExists)(detectedPagesAppPath)) {
|
|
276
|
+
// Pages Router support:
|
|
277
|
+
// - patch pages/_app.tsx (+ ensure _document.tsx hydration safety)
|
|
278
|
+
// - switch the kit-provided app-providers entrypoint to the Pages-safe variant
|
|
279
|
+
if (options.yes) {
|
|
280
|
+
try {
|
|
281
|
+
await (0, file_operations_1.updatePagesAppWithAppProviders)();
|
|
282
|
+
await (0, file_operations_1.ensurePagesDocumentSuppressHydrationWarning)();
|
|
283
|
+
// Make app-providers.tsx point at the Pages-safe implementation.
|
|
284
|
+
// (The kit defaults to App Router; Pages Router can't import @nextworks/blocks-core/server.)
|
|
285
|
+
//
|
|
286
|
+
// Patch whichever path exists (some repos have src/pages but root-level components/).
|
|
287
|
+
const candidateAppProvidersPaths = [
|
|
288
|
+
"components/app-providers.tsx",
|
|
289
|
+
"src/components/app-providers.tsx",
|
|
290
|
+
];
|
|
291
|
+
for (const appProvidersPath of candidateAppProvidersPaths) {
|
|
292
|
+
if (await (0, file_operations_1.fileExists)(appProvidersPath)) {
|
|
293
|
+
const fsExtraModule = await Promise.resolve().then(() => __importStar(require("fs-extra")));
|
|
294
|
+
await fsExtraModule.default.writeFile(appProvidersPath, 'export { default } from "./app-providers.pages";\n');
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
pagesAppUpgraded = true;
|
|
298
|
+
}
|
|
299
|
+
catch (err) {
|
|
300
|
+
console.log("⚠️ Failed to update pages/_app.tsx automatically:", err);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else if (promptFn) {
|
|
304
|
+
const { upgradePagesApp } = await promptFn([
|
|
305
|
+
{
|
|
306
|
+
type: "confirm",
|
|
307
|
+
name: "upgradePagesApp",
|
|
308
|
+
message: `Would you like the CLI to automatically wrap your ${detectedPagesAppPath} with AppProviders (and ensure suppressHydrationWarning in pages/_document.tsx)?`,
|
|
309
|
+
default: true,
|
|
310
|
+
},
|
|
311
|
+
]);
|
|
312
|
+
if (upgradePagesApp) {
|
|
313
|
+
try {
|
|
314
|
+
await (0, file_operations_1.updatePagesAppWithAppProviders)();
|
|
315
|
+
await (0, file_operations_1.ensurePagesDocumentSuppressHydrationWarning)();
|
|
316
|
+
// Make app-providers.tsx point at the Pages-safe implementation.
|
|
317
|
+
// (The kit defaults to App Router; Pages Router can't import @nextworks/blocks-core/server.)
|
|
318
|
+
//
|
|
319
|
+
// Patch whichever path exists (some repos have src/pages but root-level components/).
|
|
320
|
+
const candidateAppProvidersPaths = [
|
|
321
|
+
"components/app-providers.tsx",
|
|
322
|
+
"src/components/app-providers.tsx",
|
|
323
|
+
];
|
|
324
|
+
for (const appProvidersPath of candidateAppProvidersPaths) {
|
|
325
|
+
if (await (0, file_operations_1.fileExists)(appProvidersPath)) {
|
|
326
|
+
const fsExtraModule = await Promise.resolve().then(() => __importStar(require("fs-extra")));
|
|
327
|
+
await fsExtraModule.default.writeFile(appProvidersPath, 'export { default } from "./app-providers.pages";\n');
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
pagesAppUpgraded = true;
|
|
331
|
+
}
|
|
332
|
+
catch (err) {
|
|
333
|
+
console.log("⚠️ Failed to update pages/_app.tsx automatically:", err);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
183
338
|
console.log("\n📋 Next steps:");
|
|
184
339
|
console.log("- Templates added. Try these routes in your browser:");
|
|
185
340
|
console.log(" /templates/productlaunch");
|
|
186
341
|
console.log(" /templates/saasdashboard");
|
|
187
342
|
console.log(" /templates/digitalagency");
|
|
188
343
|
console.log(" /templates/gallery (blocks gallery)");
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
console.log(
|
|
344
|
+
// Note: depending on router type, the templates are installed into different folders,
|
|
345
|
+
// but the URLs are the same.
|
|
346
|
+
if (pagesRouterAppExists && !appRouterLayoutExists) {
|
|
347
|
+
console.log(` (Pages Router install: files live under ${mode === "src" ? "src/pages/templates/<template>/index.tsx" : "pages/templates/<template>/index.tsx"})`);
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
console.log(` (App Router install: files live under ${mode === "src" ? "src/app/templates" : "app/templates"})`);
|
|
351
|
+
}
|
|
352
|
+
if (layoutUpgraded) {
|
|
353
|
+
console.log(`1. ${detectedLayoutPath} was updated to wrap the app with AppProviders and add suppressHydrationWarning.`);
|
|
193
354
|
console.log("2. Ensure Tailwind is configured and app/globals.css is present (copied if available).");
|
|
194
355
|
console.log("3. Install new dependencies: npm install");
|
|
195
356
|
}
|
|
357
|
+
else if (pagesAppUpgraded) {
|
|
358
|
+
console.log(`1. ${detectedPagesAppPath} was updated to wrap the app with AppProviders (and fonts).`);
|
|
359
|
+
console.log("2. pages/_document.tsx was ensured/updated to include suppressHydrationWarning.");
|
|
360
|
+
console.log("3. Install new dependencies: npm install");
|
|
361
|
+
}
|
|
196
362
|
else {
|
|
197
|
-
console.log(
|
|
363
|
+
console.log(`1. Wrap your app with the AppProviders wrapper in ${detectedLayoutPath} (App Router) or ${detectedPagesAppPath} (Pages Router):`);
|
|
364
|
+
console.log(' import AppProviders from "@/components/app-providers";');
|
|
365
|
+
console.log(" Wrap your application with <AppProviders> to enable fonts, presets, CSS variable injection, session provider, and the app toaster.");
|
|
198
366
|
console.log("2. Ensure Tailwind is configured and app/globals.css is present (copied if available).");
|
|
199
367
|
console.log("3. Install new dependencies: npm install");
|
|
200
368
|
}
|