@swifttui/build 0.4.6 → 0.5.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.
Files changed (2) hide show
  1. package/README.md +18 -18
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -9,9 +9,9 @@ compile a SwiftTUI app to `wasm32-wasi` and capture its scene manifest.**
9
9
  `@swifttui/build` turns a SwiftTUI app into the two artifacts the browser needs:
10
10
  an `app.wasm` and a `scene-manifest.json`. It drives the Swift toolchain, runs a
11
11
  browser `WebAssembly.compile` validation pass, and packages the result. It
12
- intentionally sits outside [`@swifttui/web`](https://www.npmjs.com/package/@swifttui/web)
13
- (the browser runtime) so runtime imports never pull in Swift process spawning,
14
- Node filesystem APIs, or wasm packaging helpers.
12
+ is separate from [`@swifttui/web`](https://www.npmjs.com/package/@swifttui/web),
13
+ the browser runtime. Thus, runtime imports do not include Swift processes, Node
14
+ filesystem APIs, or wasm packaging helpers.
15
15
 
16
16
  - **Runtime counterpart:** [`@swifttui/web`](https://www.npmjs.com/package/@swifttui/web)
17
17
  — mounts the artifacts this package produces.
@@ -20,18 +20,18 @@ Node filesystem APIs, or wasm packaging helpers.
20
20
 
21
21
  ## Installation
22
22
 
23
- Published to npm as an ESM package with a Node CLI and bundled TypeScript
24
- declarations:
23
+ Install the ESM package from npm. The package includes a Node CLI and bundled
24
+ TypeScript declarations:
25
25
 
26
26
  ```bash
27
27
  npm install --save-dev @swifttui/build
28
28
  ```
29
29
 
30
30
  This exposes the `swifttui-web` CLI (`npx swifttui-web build --app <Exe>`) and a
31
- programmatic ESM API. The package ships compiled `dist/` JavaScript the bin
32
- runs on plain Node (`#!/usr/bin/env node`), no Bun or TypeScript toolchain
33
- required to consume it. Building a SwiftTUI app to wasm does require a Swift
34
- 6.3.x toolchain and the `swift-6.3.3-RELEASE_wasm` SDK on your machine.
31
+ programmatic ESM API. The package contains compiled JavaScript in `dist/`. The
32
+ binary runs on Node (`#!/usr/bin/env node`). You do not need Bun or a TypeScript
33
+ toolchain to use it. To compile a SwiftTUI app to wasm, install Swift 6.3.x and
34
+ the `swift-6.3.3-RELEASE_wasm` SDK.
35
35
 
36
36
  ## Use
37
37
 
@@ -71,21 +71,21 @@ Callers can override `swiftCommand`, `swiftSDK`, `configuration`,
71
71
 
72
72
  > The WASI release flags (`-Osize` plus `-disable-llvm-merge-functions-pass`)
73
73
  > keep the output under the browser `WebAssembly` API's 1000-parameter limit.
74
- > The canonical command lives in this package prefer the CLI/API over a
75
- > hand-rolled `swift build`.
74
+ > The canonical command is in this package. Use the CLI or API instead of a
75
+ > separate `swift build` command.
76
76
 
77
77
  ## Developing this package
78
78
 
79
- > Only needed if you are working **on** `@swifttui/build` itself. Consuming it
80
- > from a project needs only `npm install --save-dev` (above).
79
+ > This section applies only to work **on** `@swifttui/build`. A project that
80
+ > uses the package needs only the `npm install --save-dev` command above.
81
81
 
82
- Use Bun for the CLI, bundling, and tests, and `swiftly` Swift 6.3.3 for the wasm
83
- build it invokes (not bare `swift`).
82
+ Use Bun for the CLI, bundling, and tests. Use `swiftly` Swift 6.3.3 for the wasm
83
+ build. Do not use bare `swift`.
84
84
 
85
85
  - `bun test`
86
- - `bun run build` — compile the publishable package to `dist/` with tsdown
87
- (ESM `.js` + `.d.ts`, plus the `swifttui-web` bin). Run automatically on
88
- publish via `prepublishOnly`.
86
+ - `bun run build` — Compile the publishable package to `dist/` with tsdown.
87
+ The output contains ESM `.js`, `.d.ts`, and the `swifttui-web` binary.
88
+ `prepublishOnly` runs this command during publication.
89
89
  - `bun run build:manifest -- --app <AppExecutable>`
90
90
  - `bun run build:wasm -- --app <AppExecutable>`
91
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swifttui/build",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@swifttui/web": "0.4.6"
42
+ "@swifttui/web": "0.5.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/bun": "1.3.13"