solidui-cli 0.7.2 → 1.0.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/LICENSE +43 -4
- package/README.md +47 -21
- package/dist/index.js +3333 -1085
- package/package.json +46 -36
package/LICENSE
CHANGED
|
@@ -1,10 +1,49 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2023 shadcn
|
|
4
3
|
Copyright (c) 2023 Stefan E-K
|
|
4
|
+
Copyright (c) 2026 Solid UI contributors
|
|
5
|
+
Copyright (c) 2023 shadcn (portions adapted from shadcn/ui)
|
|
5
6
|
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
7
13
|
|
|
8
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
9
16
|
|
|
10
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
Registry items and the docs inline icon paths from Lucide (https://lucide.dev),
|
|
28
|
+
distributed under the ISC License:
|
|
29
|
+
|
|
30
|
+
ISC License
|
|
31
|
+
|
|
32
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
33
|
+
|
|
34
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
35
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
36
|
+
copyright notice and this permission notice appear in all copies.
|
|
37
|
+
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
39
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
40
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
41
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
42
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
43
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
44
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
+
|
|
46
|
+
Lucide derives some of these icons from Feather (https://feathericons.com),
|
|
47
|
+
for example check, chevron-right, ellipsis, panel-left, triangle-alert and x.
|
|
48
|
+
Those icons are also Copyright (c) 2013-present Cole Bemis and licensed
|
|
49
|
+
under the MIT License above.
|
package/README.md
CHANGED
|
@@ -1,42 +1,68 @@
|
|
|
1
|
-
#
|
|
1
|
+
# solidui-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Add [Solid UI](https://www.solid-ui.com) components to your Solid 2 app. Like shadcn/ui, the CLI copies the component source into your project, so you own and edit it. The components are built with [UI SDK](https://ui-sdk.dev) and Tailwind CSS.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Requires** Solid 2, Vite with `@solidjs/vite-plugin`, Tailwind CSS 4.3 or later and TypeScript. Projects on Solid 1 or Tailwind CSS 3 keep using `solidui-cli@0.7.2`, or follow the [migration guide](https://www.solid-ui.com/docs/migration).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
The `init` command installs dependencies, adds the `cn` util, configures `tailwind.config.cjs`, and sets up CSS variables for the project.
|
|
7
|
+
## Quick start
|
|
10
8
|
|
|
11
9
|
```bash
|
|
10
|
+
npm create solid@latest # choose Solid 2.0, TypeScript and with-tailwindcss
|
|
11
|
+
cd my-app
|
|
12
12
|
npx solidui-cli@latest init
|
|
13
|
+
npx solidui-cli@latest add button
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Use the `add` command to add components to your project.
|
|
16
|
+
Run the CLI with your package manager (`pnpm dlx`, `bunx`, `yarn dlx`): `init` installs the dependencies with it if they aren't installed yet.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
```tsx
|
|
19
|
+
import { Button } from "~/components/ui/button"
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
export default function App() {
|
|
22
|
+
return <Button>Click me</Button>
|
|
23
|
+
}
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
## Commands
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
npx solidui-cli@latest add alert-dialog
|
|
29
|
-
```
|
|
28
|
+
**`init`** checks your Solid and Tailwind CSS versions, writes `components.json`, the theme in `solid-ui.css` and the `cn` helper, sets up the `~/` import alias in `tsconfig.json` and `vite.config.ts`, and installs the shared packages.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
| Option | Description |
|
|
31
|
+
| --------------------- | ------------------------------------------------------------ |
|
|
32
|
+
| `-p, --preset <code>` | a preset code from [Create](https://www.solid-ui.com/create) |
|
|
33
|
+
| `-y, --yes` | skip the prompts and use the defaults |
|
|
34
|
+
| `-f, --force` | replace an existing `components.json` and `solid-ui.css` |
|
|
35
|
+
| `--css <file>` | the app stylesheet that imports Tailwind CSS |
|
|
36
|
+
| `--alias <prefix>` | the import alias for the components (default: `~`) |
|
|
37
|
+
| `-c, --cwd <dir>` | the project directory |
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
**`add [components...]`** copies components and the components they use into your project and installs their packages. Without names, it lets you pick from the catalog.
|
|
40
|
+
|
|
41
|
+
| Option | Description |
|
|
42
|
+
| ----------------- | ---------------------------------------- |
|
|
43
|
+
| `-o, --overwrite` | replace files that differ |
|
|
44
|
+
| `-y, --yes` | skip the prompts; keep files that differ |
|
|
45
|
+
| `-a, --all` | add every component |
|
|
46
|
+
| `-c, --cwd <dir>` | the project directory |
|
|
47
|
+
|
|
48
|
+
## Common tasks
|
|
49
|
+
|
|
50
|
+
| Task | Command |
|
|
51
|
+
| ---------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
52
|
+
| [Run without prompts in CI or scripts](https://www.solid-ui.com/docs/cli/#skip-the-prompts) | `init --preset <code> --yes` |
|
|
53
|
+
| [Switch the theme](https://www.solid-ui.com/docs/cli/#switch-the-theme) | `init --preset <code> --force` |
|
|
54
|
+
| [Use `@/` instead of `~/`](https://www.solid-ui.com/docs/cli/#use-another-import-alias) | `init --alias @` |
|
|
55
|
+
| [Take the latest version of a component](https://www.solid-ui.com/docs/cli/#update-components) | `add button --overwrite` |
|
|
56
|
+
|
|
57
|
+
The CLI only changes the version of a package you already have after asking, or with `--yes` where the components need it, and never replaces a component you edited unless you pass `--overwrite`.
|
|
36
58
|
|
|
37
59
|
## Documentation
|
|
38
60
|
|
|
39
|
-
|
|
61
|
+
- [Installation](https://www.solid-ui.com/docs/installation)
|
|
62
|
+
- [CLI reference and examples](https://www.solid-ui.com/docs/cli)
|
|
63
|
+
- [Components](https://www.solid-ui.com/docs/components)
|
|
64
|
+
|
|
65
|
+
To test against another registry host, such as a local docs server, set `SOLID_UI_REGISTRY_URL=http://localhost:4321`.
|
|
40
66
|
|
|
41
67
|
## License
|
|
42
68
|
|