Skip to content

Commit 9968357

Browse files
Add README.md to ExportSwift example
1 parent 4504e13 commit 9968357

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Examples/ExportSwift/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ExportSwift Example
2+
This example demonstrates how to export Swift functions to JavaScript.
3+
4+
## Building and Running
5+
6+
1. Build the project:
7+
```sh
8+
env JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS=1 swift package --swift-sdk $SWIFT_SDK_ID js --use-cdn
9+
```
10+
11+
2. Serve the files:
12+
```sh
13+
npx serve
14+
```
15+
16+
Then open your browser to `http://localhost:3000`.

0 commit comments

Comments
 (0)