@marwes-ui/cli 0.1.0 → 0.2.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/CHANGELOG.md +10 -0
- package/README.md +35 -2
- package/dist/cli.js +392 -63
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +392 -63
- package/dist/index.js.map +1 -1
- package/package.json +22 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @marwes-ui/cli
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#44](https://github.com/niklas-westman/marwes/pull/44) [`6dbb453`](https://github.com/niklas-westman/marwes/commit/6dbb45356374cc50cb40204fd1dac5effc243b53) Thanks [@niklas-westman](https://github.com/niklas-westman)! - Make setup outcomes explicit, run static `doctor` checks after init, and recognize imported and rendered providers across framework aliases, Vue template/render-function forms, React namespace/render-function forms, and Svelte layouts. Report manual provider wiring with exit code 2 while preserving underlying installation and verification failure codes.
|
|
8
|
+
|
|
9
|
+
Require an app build script for `doctor --run-build`, run an optional typecheck before the production build, and stop on the first failed script while preserving its exit code. Normal init remains a static setup check rather than build verification.
|
|
10
|
+
|
|
11
|
+
Print theme setup guidance after successful init, complete typed framework provider examples for agentic and manual setup, and adapter-only import, automatic CSS, provider-scoped variable, and resolved-theme guidance. Add complete subcommand help and framework setup links.
|
|
12
|
+
|
|
3
13
|
## 0.1.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -15,7 +15,9 @@ The official installer for Marwes UI. Sets up an existing React, Vue, or Svelte
|
|
|
15
15
|
|
|
16
16
|
## What It Does
|
|
17
17
|
|
|
18
|
-
The CLI installs the matching adapter package (`@marwes-ui/react`, `@marwes-ui/vue`, or `@marwes-ui/svelte`), wraps a recognized Vite starter root with `MarwesProvider`, and
|
|
18
|
+
The CLI installs the matching adapter package (`@marwes-ui/react`, `@marwes-ui/vue`, or `@marwes-ui/svelte`), wraps a recognized Vite starter root with `MarwesProvider`, and runs the static `doctor` checks. Default Marwes styling is loaded by the adapter — no manual CSS setup. Normal `init` does not run your app's typecheck or production build; use `doctor --run-build` afterward.
|
|
19
|
+
|
|
20
|
+
Automatic provider patching intentionally targets the standard React, Vue, and Svelte Vite layouts. Other app structures still get dependency installation, an exact provider example, a framework setup link, and exit code `2` so automated callers can detect the required manual step.
|
|
19
21
|
|
|
20
22
|
Apps never need to depend on `@marwes-ui/core` or `@marwes-ui/presets` directly.
|
|
21
23
|
|
|
@@ -44,12 +46,23 @@ Supported templates: `react-ts`, `vue-ts`, `svelte-ts`. See [`create-marwes`](ht
|
|
|
44
46
|
|
|
45
47
|
## AI-Assisted Setup
|
|
46
48
|
|
|
47
|
-
Agentic mode is for AI coding agents (Claude Code, Cursor, etc.).
|
|
49
|
+
Agentic mode is for AI coding agents (Claude Code, Cursor, etc.). Every non-dry-run `init` that reaches setup verification runs the static `doctor` checks. Successful normal setup prints theme guidance; agentic mode also prints a complete typed provider example for the selected framework. Manual setup prints that example so you can wire the provider yourself:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
pnpm dlx @marwes-ui/cli init --adapter react --agentic
|
|
53
|
+
pnpm dlx @marwes-ui/cli doctor --run-build
|
|
51
54
|
```
|
|
52
55
|
|
|
56
|
+
The setup guidance keeps these boundaries explicit:
|
|
57
|
+
|
|
58
|
+
- Import Marwes APIs from the selected adapter root, not `@marwes-ui/core` or `@marwes-ui/presets`.
|
|
59
|
+
- The adapter includes preset CSS. Do not add a second Marwes stylesheet.
|
|
60
|
+
- Render components and app-owned styles below `MarwesProvider`. Theme CSS variables are scoped to its DOM descendants, not `:root`.
|
|
61
|
+
- Use `mwTheme`, `mwThemeVars`, or `mwVar()` for CSS references. Use the adapter's `useTheme()` when JavaScript needs resolved theme values.
|
|
62
|
+
- Run `doctor --run-build` before claiming setup is build-verified.
|
|
63
|
+
|
|
64
|
+
Follow the selected framework's setup guide for customization: [React](https://marwes.io/docs/get-started/react/), [Vue](https://marwes.io/docs/get-started/vue/), or [Svelte](https://marwes.io/docs/get-started/svelte/). See [theming](https://marwes.io/docs/theming/) for theme configuration.
|
|
65
|
+
|
|
53
66
|
## Commands
|
|
54
67
|
|
|
55
68
|
```bash
|
|
@@ -66,6 +79,26 @@ marwes create <name> --template <react-ts|vue-ts|svelte-ts>
|
|
|
66
79
|
| `ai-prompt` | Print the setup prompt an AI agent should follow. |
|
|
67
80
|
| `create` | Scaffold a new Vite app (same as `pnpm create marwes@latest`). |
|
|
68
81
|
|
|
82
|
+
Use `--help` on any subcommand for its focused options, for example `marwes doctor --help`.
|
|
83
|
+
|
|
84
|
+
## Verification and Exit Codes
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
marwes doctor --run-build
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Run from the consumer app root. `doctor` searches `src/`, `app/`, `pages/`, and common root entry files for an imported and rendered provider from the selected adapter. It recognizes framework aliases and supported JSX, template, and render-function forms. These are static source checks, not proof that every component is wrapped at runtime. Direct internal-package imports and an extra preset stylesheet are reported as warnings; review them even when the command exits successfully.
|
|
91
|
+
|
|
92
|
+
With `--run-build`, a `build` script is required. The CLI runs `typecheck` first when present, then `build`, stopping on the first failed script and preserving its exit code. A missing `build` script fails verification. Without `--run-build`, neither script runs.
|
|
93
|
+
|
|
94
|
+
| Exit code | Meaning |
|
|
95
|
+
| --------- | ------- |
|
|
96
|
+
| `0` | The requested checks passed; review any warnings. Only `doctor --run-build` verifies the app's build. |
|
|
97
|
+
| `2` with a manual-action-required setup message | `init` or `create` needs a manual provider-wiring step. Installation may have been skipped with `--no-install`. Apply the printed example, then rerun `doctor --run-build`. |
|
|
98
|
+
| Any non-zero with a failure message | Installation, verification, typecheck, or build failed. The underlying command code is preserved when available, including `2`. |
|
|
99
|
+
|
|
100
|
+
Do not interpret exit code `2` alone as partial setup: `doctor` does not install packages, and an installation or app script can itself fail with code `2`. Read the printed outcome before deciding how to recover.
|
|
101
|
+
|
|
69
102
|
## Global Flags
|
|
70
103
|
|
|
71
104
|
| Flag | Meaning |
|