@swifttui/web 0.6.3 → 0.7.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.
- package/README.md +8 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -143,40 +143,14 @@ self-describing.
|
|
|
143
143
|
|
|
144
144
|
## Developing this package
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- `bun test`
|
|
156
|
-
- `bun run build` — Compile the publishable package to `dist/` with tsdown.
|
|
157
|
-
The output contains ESM `.js` and `.d.ts` files. `prepublishOnly` runs this
|
|
158
|
-
command during publication.
|
|
159
|
-
- `bun run build:manifest -- --app <AppExecutable>`
|
|
160
|
-
- `bun run build:wasm -- --app <AppExecutable>`
|
|
161
|
-
- `bun run build:web`
|
|
162
|
-
- `bun run build:app -- --app <AppExecutable>`
|
|
163
|
-
- `bun run dev`
|
|
164
|
-
|
|
165
|
-
`build` produces the published library. `build:manifest`, `build:wasm`, and
|
|
166
|
-
`build:app` delegate manifest and WASI packaging to `@swifttui/build`.
|
|
167
|
-
`build:wasm` and `build:app` use `--configuration release` by default. Pass
|
|
168
|
-
`--configuration debug` for local debug wasm builds. The demo app pipeline
|
|
169
|
-
writes its artifacts to `dist-demo/`. Thus, they stay separate from the
|
|
170
|
-
published `dist/` library output.
|
|
171
|
-
|
|
172
|
-
The demo/app build flow is intentionally small:
|
|
173
|
-
|
|
174
|
-
1. `build:manifest` runs `swiftly run swift` and captures the Swift app output for `SWIFTTUI_MODE=manifest`.
|
|
175
|
-
2. `build:wasm` copies the app wasm artifact to
|
|
176
|
-
`dist-demo/assets/app.wasm`. The command makes sure that the browser
|
|
177
|
-
`WebAssembly` API accepts the artifact. Then it strips the artifact. It keeps
|
|
178
|
-
the stripped artifact only if the browser can parse it.
|
|
179
|
-
3. `build:web` bundles `index.html` and the browser entrypoint with Bun.
|
|
146
|
+
Development happens in the
|
|
147
|
+
[`swift-tui-web`](https://github.com/SwiftTUI/swift-tui-web) workspace, not
|
|
148
|
+
against the published tarball. The workspace commands and build pipeline are
|
|
149
|
+
documented in the repository's `docs/DEVELOPMENT.md` and
|
|
150
|
+
`packages/web/AGENTS.md`. An app that uses this package needs only
|
|
151
|
+
`npm install` — no Bun, no Swift toolchain.
|
|
152
|
+
|
|
153
|
+
Full SwiftTUI API reference: <https://swifttui.sh/docs/documentation/>.
|
|
180
154
|
|
|
181
155
|
## License
|
|
182
156
|
|