Skip to content

Commit 9eb648e

Browse files
Merge pull request #3 from Groupguanfang/main
feat: add README for zod package, update package.json
2 parents 2964673 + bec1f3f commit 9eb648e

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

packages/schema/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# @usf-org/schema
2+
3+
Zod schema for USF.
4+
5+
## Usage
6+
7+
```ts
8+
import { Schema } from '@usf-org/schema'
9+
10+
const schema = Schema.safeParse({})
11+
```
12+
13+
You also can use `toJsonSchema` to get the JSON Schema of the schema.
14+
15+
```ts
16+
import { toJsonSchema } from '@usf-org/schema'
17+
18+
const jsonSchema = toJsonSchema(Schema)
19+
```
20+
21+
## License
22+
23+
[MIT](../../LICENSE)

packages/schema/package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
{
22
"name": "@usf-org/zod",
33
"type": "module",
4-
"version": "0.0.1",
4+
"version": "0.0.2",
55
"description": "Zod schema for USF.",
66
"author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
7+
"license": "MIT",
8+
"homepage": "https://github.com/USF-org/USF-TS",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/USF-org/USF-TS.git",
12+
"directory": "packages/schema"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/USF-org/USF-TS/issues",
16+
"email": "zero@naily.cc"
17+
},
718
"keywords": [
819
"zod",
920
"schema",
@@ -19,6 +30,12 @@
1930
"main": "./dist/index.cjs",
2031
"module": "./dist/index.js",
2132
"types": "./dist/index.d.ts",
33+
"files": [
34+
"dist"
35+
],
36+
"engines": {
37+
"node": ">16"
38+
},
2239
"scripts": {
2340
"build": "tsup",
2441
"watch": "tsup -w",

0 commit comments

Comments
 (0)