create-kywi-app 0.2.1 → 0.3.1

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.
Files changed (3) hide show
  1. package/README.md +25 -29
  2. package/lib/templates.mjs +1203 -40
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -100,47 +100,43 @@ The generated project's own `README.md` walks through `createdb`, copying
100
100
  `decoupled` deployment it also shows the `@kywi-software/sdk` usage snippet (see
101
101
  `packages/sdk/README.md` in this monorepo for the current, verified SDK API).
102
102
 
103
- ## Using an unpublished checkout (local packages)
103
+ ## Installing the generated packages
104
104
 
105
- The `@kywi-software/*` packages are not published to npm yet, so the generated
106
- `package.json` refs (`"@kywi-software/core": "^0.1.0"`, etc.) will not install
107
- as-is. To scaffold against a **local checkout of this monorepo**, point those two
108
- deps at your built local packages before `pnpm install`.
105
+ All `@kywi-software/*` packages (`core`, `cli`, `sdk`, `mcp`, `js`) are
106
+ published to npm at the same version as `create-kywi-app`. The `package.json`
107
+ this tool writes pins `"@kywi-software/core"` and `"@kywi-software/cli"` to
108
+ `^<that version>` (see `buildFileSet()` in `lib/templates.mjs`), so a plain
109
109
 
110
- The most reliable way (mirrors a real npm install — dist-only, deduped React) is
111
- to pack the packages and reference the tarballs:
110
+ ```bash
111
+ cd my-site && pnpm install # (or npm install / yarn)
112
+ ```
113
+
114
+ resolves them straight from the registry — no local build, packing, or
115
+ override step required.
116
+
117
+ ### Working against a local monorepo checkout instead
118
+
119
+ If you're developing `@kywi-software/*` itself and want a scaffolded app to
120
+ pick up **unreleased** local changes rather than the published npm packages,
121
+ build and pack the packages you changed, then repoint those two deps at the
122
+ tarballs in the generated `package.json` (mirrors a real npm install —
123
+ dist-only, deduped React — better than a `file:` link to the source directory,
124
+ which risks a duplicate React copy):
112
125
 
113
126
  ```bash
114
- # 1. From the monorepo, build + pack core and cli
115
127
  pnpm --filter @kywi-software/core --filter @kywi-software/cli build
116
128
  ( cd packages/core && pnpm pack --pack-destination /tmp/kywi-pkgs )
117
129
  ( cd packages/cli && pnpm pack --pack-destination /tmp/kywi-pkgs )
118
-
119
- # 2. Scaffold your app
120
130
  node packages/create-kywi-app/bin/create-kywi-app.mjs my-site --yes
121
-
122
- # 3. Repoint the two @kywi-software deps at the tarballs in my-site/package.json,
123
- # AND add a pnpm override so cli's own core dependency resolves to the tarball:
124
- # "dependencies": {
125
- # "@kywi-software/core": "file:/tmp/kywi-pkgs/kywi-software-core-0.1.0.tgz",
126
- # "@kywi-software/cli": "file:/tmp/kywi-pkgs/kywi-software-cli-0.1.0.tgz"
127
- # },
128
- # "pnpm": {
129
- # "overrides": {
130
- # "@kywi-software/core": "file:/tmp/kywi-pkgs/kywi-software-core-0.1.0.tgz",
131
- # "@kywi-software/cli": "file:/tmp/kywi-pkgs/kywi-software-cli-0.1.0.tgz"
132
- # }
133
- # }
134
-
135
- # 4. Then the normal flow works unchanged
136
- cd my-site && pnpm install && createdb my_site && cp .env.example .env
131
+ cd my-site
132
+ # Repoint "@kywi-software/core"/"@kywi-software/cli" in package.json at
133
+ # file:/tmp/kywi-pkgs/kywi-software-{core,cli}-<version>.tgz, then:
134
+ pnpm install && createdb my_site && cp .env.example .env
137
135
  # (set DATABASE_URL + AUTH_SECRET in .env)
138
136
  pnpm migrate && pnpm seed && pnpm dev
139
137
  ```
140
138
 
141
- `file:` to a directory (`file:../kywi/packages/core`) also works but risks a
142
- duplicate React copy through the symlink; tarballs avoid that. Re-pack after any
143
- change to core/cli and re-run `pnpm install`.
139
+ Re-pack after any change to core/cli and re-run `pnpm install`.
144
140
 
145
141
  ## Testing
146
142