mirror of
https://github.com/yusing/godoxy.git
synced 2025-07-11 00:34:02 +02:00
refactor: move typescript stuff to 'schemas' directory
This commit is contained in:
parent
f966ca8b83
commit
a9e4f82e30
5 changed files with 10 additions and 6 deletions
0
.gitmodules
vendored
0
.gitmodules
vendored
6
Makefile
6
Makefile
|
@ -103,7 +103,7 @@ gen-schema-single:
|
||||||
python3 -c "import json; f=open('schemas/${OUT}', 'r'); j=json.load(f); f.close(); f=open('schemas/${OUT}', 'w'); json.dump(j, f, separators=(',', ':'));"
|
python3 -c "import json; f=open('schemas/${OUT}', 'r'); j=json.load(f); f.close(); f=open('schemas/${OUT}', 'w'); json.dump(j, f, separators=(',', ':'));"
|
||||||
|
|
||||||
gen-schema:
|
gen-schema:
|
||||||
bun --bun tsc
|
cd schemas && bun --bun tsc
|
||||||
make IN=config/config.ts \
|
make IN=config/config.ts \
|
||||||
CLASS=Config \
|
CLASS=Config \
|
||||||
OUT=config.schema.json \
|
OUT=config.schema.json \
|
||||||
|
@ -120,6 +120,10 @@ gen-schema:
|
||||||
CLASS=DockerRoutes \
|
CLASS=DockerRoutes \
|
||||||
OUT=docker_routes.schema.json \
|
OUT=docker_routes.schema.json \
|
||||||
gen-schema-single
|
gen-schema-single
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
publish-schema:
|
||||||
|
cd schemas && bun publish && cd ..
|
||||||
|
|
||||||
update-schema-generator:
|
update-schema-generator:
|
||||||
pnpm up -g typescript-json-schema
|
pnpm up -g typescript-json-schema
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./schemas/index.ts",
|
"main": "./index.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./schemas/index.d.ts",
|
"types": "./index.d.ts",
|
||||||
"import": "./schemas/index.ts",
|
"import": "./index.ts",
|
||||||
"require": "./schemas/index.js"
|
"require": "./index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
|
@ -12,5 +12,5 @@
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"declaration": true
|
"declaration": true
|
||||||
},
|
},
|
||||||
"include": ["schemas"]
|
"include": ["."]
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue