@viliha/vui-ui 1.5.1 → 1.5.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/AGENT.md +41 -0
- package/README.md +20 -0
- package/bin/vui.mjs +11 -5
- package/package.json +1 -1
package/AGENT.md
CHANGED
|
@@ -86,6 +86,47 @@ dependencies** with the package manager it detects from the lockfile (npm / pnpm
|
|
|
86
86
|
Other flags: `--yes` / `--force` / `--dry-run`. If you only need the components, pass
|
|
87
87
|
`--theme-only` (or skip `init` entirely) and follow the setup below.
|
|
88
88
|
|
|
89
|
+
### Inside a Turborepo / monorepo
|
|
90
|
+
|
|
91
|
+
**Never scaffold into the repo root** — a monorepo root has no `app/` and no Next
|
|
92
|
+
app. Target the specific application, e.g. `apps/web`. Two equivalent ways:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# A) from the repo root, name the app dir
|
|
96
|
+
npx @viliha/vui-ui init --turbo --dir apps/web
|
|
97
|
+
|
|
98
|
+
# B) from inside the app (simplest to reason about)
|
|
99
|
+
cd apps/web
|
|
100
|
+
npx @viliha/vui-ui init
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
In turbo mode the CLI **does not auto-install** (installs are workspace-specific),
|
|
104
|
+
so finish the setup yourself, scoped to that app:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd apps/web # be inside the app, not the root
|
|
108
|
+
pnpm add @viliha/vui-ui … # or: pnpm --filter <app-name> add @viliha/vui-ui …
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Then confirm the app is in your workspace globs (`pnpm-workspace.yaml` /
|
|
112
|
+
`package.json` `workspaces`) and run it with a filter: `pnpm --filter <app-name>
|
|
113
|
+
dev`. The theme import, `transpilePackages`, and the `@/*` alias all belong in
|
|
114
|
+
**that app's** `globals.css` / `next.config` / `tsconfig`, not the root.
|
|
115
|
+
|
|
116
|
+
### End-to-end walkthroughs
|
|
117
|
+
|
|
118
|
+
- **New standalone app** — `npx create-next-app@latest my-app --ts --tailwind
|
|
119
|
+
--app --no-src-dir --use-npm`, then `cd my-app && npx @viliha/vui-ui init`
|
|
120
|
+
(fresh + prebuilt). It scaffolds config + shell + demo, installs deps, and you
|
|
121
|
+
run `npm run dev` → `/dashboard`.
|
|
122
|
+
- **New app in a monorepo** — scaffold your app under `apps/<name>` (e.g. with
|
|
123
|
+
`create-next-app`), then from that app dir run `npx @viliha/vui-ui init` (or
|
|
124
|
+
`--turbo --dir apps/<name>` from the root) and install deps in that app.
|
|
125
|
+
- **Existing app** — run `npx @viliha/vui-ui init --existing`. It never
|
|
126
|
+
overwrites your config; wire up the four things it prints (`transpilePackages`,
|
|
127
|
+
the `theme.css` import, the `@/*` alias, `import "./globals.css"`). Prefer only
|
|
128
|
+
the components? Use `--theme-only` (copies nothing) and follow the setup below.
|
|
129
|
+
|
|
89
130
|
VUI ships as TypeScript source.
|
|
90
131
|
|
|
91
132
|
## Next.js
|
package/README.md
CHANGED
|
@@ -109,6 +109,26 @@ cd my-app && bunx @viliha/vui-ui init && bun dev
|
|
|
109
109
|
the demo pages, overwriting the create-next-app boilerplate, and installs the
|
|
110
110
|
dependencies. The demo then runs out of the box at `/dashboard`.
|
|
111
111
|
|
|
112
|
+
### Turborepo / monorepo
|
|
113
|
+
|
|
114
|
+
Scaffold **inside the target app** (e.g. `apps/web`), never at the repo root —
|
|
115
|
+
the root has no `app/` and no Next.js app. Run `init` from the app, or name it
|
|
116
|
+
from the root with `--dir`:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# from inside the app (simplest)
|
|
120
|
+
cd apps/web && npx @viliha/vui-ui init
|
|
121
|
+
|
|
122
|
+
# …or from the repo root
|
|
123
|
+
npx @viliha/vui-ui init --turbo --dir apps/web
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
In monorepo mode `init` does **not** auto-install (installs are
|
|
127
|
+
workspace-specific), so add the deps to that app afterward — `cd apps/web && pnpm
|
|
128
|
+
add @viliha/vui-ui …`, or from the root `pnpm --filter web add @viliha/vui-ui …`.
|
|
129
|
+
The `transpilePackages` entry, the `theme.css` import, and the `@/*` alias all
|
|
130
|
+
belong to **that app**, not the root.
|
|
131
|
+
|
|
112
132
|
### ⚠️ Existing project — read this first
|
|
113
133
|
|
|
114
134
|
Adding VUI to an app you already have takes a little care. **`init --existing`
|
package/bin/vui.mjs
CHANGED
|
@@ -306,11 +306,17 @@ The shell + demo were added under app/(app)/ and app/_components/ — review the
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
if (turbo) {
|
|
309
|
-
console.log(`Turborepo
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
309
|
+
console.log(`Turborepo — finish inside the target app (${appDir}):
|
|
310
|
+
1. cd ${appDir}
|
|
311
|
+
2. Install the deps in THIS app (not the repo root):
|
|
312
|
+
${ADD_CMD[pm]} ${installList}
|
|
313
|
+
(or from the root with your workspace filter, e.g.
|
|
314
|
+
${pm} --filter <app-name> add ${installList})
|
|
315
|
+
3. Make sure your workspace globs include this app
|
|
316
|
+
(pnpm-workspace.yaml \`packages:\` or package.json \`workspaces\`).
|
|
317
|
+
4. Run it: ${pm} --filter <app-name> dev (or \`cd ${appDir} && ${pm} dev\`)
|
|
318
|
+
|
|
319
|
+
Deps were NOT auto-installed for a monorepo — installs are workspace-specific.
|
|
314
320
|
`);
|
|
315
321
|
}
|
|
316
322
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viliha/vui-ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Vui UI — a clean, token-driven React admin/CRM component library built on Tailwind CSS v4, shadcn-style patterns, and Radix Icons. Ships as TypeScript source (Just-in-Time), compiled by the consuming app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Suman Bonakurthi",
|