File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed
Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " basic"
3- version = " 0.1.0 "
3+ version = " 0.0.1 "
44edition = " 2021"
55
66[lib ]
Original file line number Diff line number Diff line change 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
3343import * as V1 from " ./dist/v1" ;
3444import * as V2 from " ./dist/v2" ;
3545import * 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
4151import { createVersionedDataHandler } from " vbare" ;
Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff line change 3232 "engines" : {
3333 "node" : " >=18.0.0"
3434 }
35- }
35+ }
You can’t perform that action at this time.
0 commit comments