delacour 0.1.0-alpha.4 → 0.1.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 +9 -9
- package/dist/index.js +1180 -999
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ repository — you own `button.tsx` and can edit it, rather than waiting for a
|
|
|
5
5
|
release.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bunx delacour@
|
|
8
|
+
bunx delacour@latest add button
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
That is the whole install. `add` sets the project up on its first run — config, Metro, the Tailwind
|
|
@@ -58,7 +58,7 @@ whether or not any are missing:
|
|
|
58
58
|
|
|
59
59
|
```txt
|
|
60
60
|
● Needs 14 external packages, 2 not here yet:
|
|
61
|
-
│ bunx expo install
|
|
61
|
+
│ bunx expo install react-native-teleport react-native-keyboard-controller
|
|
62
62
|
│ already installed — clsx, react-native-reanimated, react-native-svg, tailwind-variants, …
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ Then it asks. `--install` answers yes without asking, `--no-install` answers no,
|
|
|
66
66
|
nobody to ask — a script, CI, an agent — installs nothing and prints the commands instead:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
bunx delacour@
|
|
69
|
+
bunx delacour@latest add bottom-sheet --install
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
The missing packages are shown as commands, not names, because the command is the part that is not
|
|
@@ -86,7 +86,7 @@ import { Button } from "@acme/ui/button";
|
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
bunx delacour@
|
|
89
|
+
bunx delacour@latest init --package-name @acme/ui --package-path packages/ui # no prompts
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
|
|
@@ -95,8 +95,8 @@ bunx delacour@alpha init --package-name @acme/ui --package-path packages/ui #
|
|
|
95
95
|
walking up from `--cwd`. In a monorepo that means:
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
cd packages/ui && bunx delacour@
|
|
99
|
-
cd apps/mobile && bunx delacour@
|
|
98
|
+
cd packages/ui && bunx delacour@latest init # shared package, several apps use it
|
|
99
|
+
cd apps/mobile && bunx delacour@latest init # straight into the app
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Either way the CLI finds the Expo app and wires *its* Metro config and CSS
|
|
@@ -158,7 +158,7 @@ a JS reload alone will red-box. `add` says so at the point it becomes true.
|
|
|
158
158
|
## Working on this package
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
|
-
bun run registry:build # rebuild registry/ from packages/native-ui
|
|
161
|
+
bun run registry:build # rebuild registry/ from packages/react-native-ui
|
|
162
162
|
bun test # unit + end-to-end against the local registry
|
|
163
163
|
bun run verify:expo # scaffold a real Expo app, add everything, typecheck it
|
|
164
164
|
bun run build # bundle dist/index.js
|
|
@@ -226,14 +226,14 @@ watching the check fire.
|
|
|
226
226
|
`--all` adds components and what they pull in, so the run also names the standalone utilities
|
|
227
227
|
explicitly — a verification pass has to cover the whole registry, not most of it.
|
|
228
228
|
|
|
229
|
-
The registry is **derived** from `packages/native-ui/src` — one item per
|
|
229
|
+
The registry is **derived** from `packages/react-native-ui/src` — one item per
|
|
230
230
|
component folder, dependencies read off the imports. There is no `registry.json`
|
|
231
231
|
to maintain, and the builder throws rather than guessing: an unclassified npm
|
|
232
232
|
import or a component folder without an `index.ts` fails the build.
|
|
233
233
|
|
|
234
234
|
It writes `registry.json` (the index), `r/<name>.json` (one item per component,
|
|
235
235
|
naming its files) and the three JSON schemas. It writes **no copy of the
|
|
236
|
-
source**: an item names the library's own file — `packages/native-ui/src/components/button/button.tsx` —
|
|
236
|
+
source**: an item names the library's own file — `packages/react-native-ui/src/components/button/button.tsx` —
|
|
237
237
|
and the client fetches it at the same ref the item came from, so the two cannot
|
|
238
238
|
disagree. A component's diff is therefore the TypeScript that changed rather
|
|
239
239
|
than a JSON string nobody can read.
|