forked from StefanTerdell/json-schema-to-zod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from botpress/ya-update
chore: update to latest version
- Loading branch information
Showing
57 changed files
with
3,266 additions
and
3,670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
src | ||
tsconfig* | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"semi": true | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Contributing | ||
|
||
Hey, thanks for wanting to contribute. | ||
|
||
Before you open a PR, make sure to open an issue and discuss the problem you want to solve. I will not consider PRs without issues. | ||
|
||
I use [gitmoji](https://gitmoji.dev/) for my commit messages because I think it's fun. I encourage you to do the same, but won't enforce it. | ||
|
||
I check PRs and issues very rarely so please be patient. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Publishing | ||
|
||
Update version in package, `npm build`, `npm publish` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { readdirSync, writeFileSync, statSync } from "fs"; | ||
|
||
const ignore = ["src/index.ts", "src/cli.ts"]; | ||
|
||
function checkSrcDir(path: string): string[] { | ||
const lines: string[] = []; | ||
|
||
for (const item of readdirSync(path)) { | ||
const itemPath = path + "/" + item; | ||
|
||
if (ignore.includes(itemPath)) { | ||
continue; | ||
} | ||
|
||
if (statSync(itemPath).isDirectory()) { | ||
lines.push(...checkSrcDir(itemPath)); | ||
} else if (item.endsWith(".ts")) { | ||
lines.push('export * from "./' + itemPath.slice(4, -2) + 'js"'); | ||
} | ||
} | ||
|
||
return lines; | ||
} | ||
|
||
const lines = checkSrcDir("src"); | ||
|
||
lines.push( | ||
'import { jsonSchemaToZod } from "./jsonSchemaToZod.js"', | ||
"export default jsonSchemaToZod", | ||
); | ||
|
||
writeFileSync("./src/index.ts", lines.join("\n")); |
Oops, something went wrong.