Skip to content

Commit

Permalink
esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
meoyawn committed Nov 28, 2022
1 parent 64c4ee8 commit 93872c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ OpenAPI toolkit

### Custom DSL


- OpenAPI DSL is extremely verbose and hard to read. It's also hard to maintain. This library provides a custom DSL that
is much more readable and maintainable.
- Advanced Types
- newtype
- template type
- external type (defined outside of the contract)

## Tutorial

Expand Down
6 changes: 4 additions & 2 deletions cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const die = (s: string): never => {
return process.exit(1)
}

void (async () => {
const main = async () => {
const file = process.argv[process.argv.length - 1]
if (!file.endsWith(".kdl")) {
return die(`expected .kdl file, got ${file}`)
Expand All @@ -22,4 +22,6 @@ void (async () => {
}

console.log(JSON.stringify(toOpenApi(kdlToCore(doc.output)), null, 2))
})()
}

void main()
8 changes: 7 additions & 1 deletion cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"extends": "../tsconfig.base.json"
"compilerOptions": {
"module": "ES2022",
"target": "ES2022"
},
"extends": "../tsconfig.base.json",
"include": ["src/"],
"exclude": ["node_modules/"]
}

0 comments on commit 93872c5

Please sign in to comment.