Skip to content

Commit ccdab34

Browse files
committed
update readme
1 parent eac6b22 commit ccdab34

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

rust/examples/basic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "basic"
3-
version = "0.1.0"
3+
version = "0.0.1"
44
edition = "2021"
55

66
[lib]

typescript/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,31 @@
2121
}
2222
```
2323

24-
**Step 2: Compile your `.bare` schema files into TypeScript modules:**
24+
**Step 2: Add a build script to your `package.json`:**
25+
26+
```json
27+
{
28+
"scripts": {
29+
"bare:build": "vbare-compiler schemas --out-dir src/dist"
30+
}
31+
}
32+
```
33+
34+
**Step 3: Compile your `.bare` schema files into TypeScript modules:**
2535

2636
```bash
27-
pnpm --filter @vbare/compiler exec -- vbare-compiler schemas --out-dir src/dist
37+
pnpm bare:build
2838
```
2939

30-
**Step 3: Import the generated modules in your project:**
40+
**Step 4: Import the generated modules in your project:**
3141

3242
```ts
3343
import * as V1 from "./dist/v1";
3444
import * as V2 from "./dist/v2";
3545
import * as V3 from "./dist/v3";
3646
```
3747

38-
**Step 4: Create a handler that understands every version:**
48+
**Step 5: Create a handler that understands every version:**
3949

4050
```ts
4151
import { createVersionedDataHandler } from "vbare";

typescript/examples/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@vbare/example-basic",
33
"private": true,
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"description": "Basic example: compile fixtures and migrate between versions",
66
"type": "module",
77
"scripts": {

typescript/vbare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
"engines": {
3333
"node": ">=18.0.0"
3434
}
35-
}
35+
}

0 commit comments

Comments
 (0)