Skip to content

Commit

Permalink
Merge pull request #1 from botpress/ya-update
Browse files Browse the repository at this point in the history
chore: update to latest version
  • Loading branch information
allardy authored Mar 8, 2024
2 parents 16b9f58 + 0c9d172 commit 0271be4
Show file tree
Hide file tree
Showing 57 changed files with 3,266 additions and 3,670 deletions.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src
tsconfig*
test
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"semi": true
}
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

9 changes: 9 additions & 0 deletions CONTRIBUTING.md
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.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Publishing

Update version in package, `npm build`, `npm publish`
32 changes: 32 additions & 0 deletions createIndex.ts
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"));
Loading

0 comments on commit 0271be4

Please sign in to comment.