Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Transpile: json schema to es5 #1

Closed
miladezzat opened this issue Dec 8, 2022 · 4 comments
Closed

How Transpile: json schema to es5 #1

miladezzat opened this issue Dec 8, 2022 · 4 comments

Comments

@miladezzat
Copy link

Description

  • when i am transpile the JSON schema it's convert to es6, i want to add options to create es5
@willfarrell
Copy link
Owner

I imagined the output of ajv-cmd would be a pre-step in a build process to convert all schema jsons to validator js, then those would be imported to one own js that are then transpiled to whatever you need into the final bundle.

Can you share your uses case?

@miladezzat
Copy link
Author

Well, i use commonJs on my project, when I run the pre transpiling JSON schema, it's transpile to es6 and i want to transpile it to es5
Screenshot 2022-12-08 at 7 45 14 PM

@willfarrell
Copy link
Owner

After some reflection, I decided I don't want to support commonjs in this project. The official ajv-cli already does this well and the ecosystem moving towards esm only. Sorry, only have so much free time. Hope ajv-cli meets your needs.

I made this project to add in the features I needed that were not being merged in like esm, uri-resolver, with modern defaults and smaller bundles.

@willfarrell
Copy link
Owner

I imagine you're looking into this for Middy. If you do choose to add in ajv-cli for cjs output, a PR to add it to the docs would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants