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

ohm-js cli : add --output argument to define the output folder #385

Open
stondini opened this issue Jul 6, 2022 · 2 comments
Open

ohm-js cli : add --output argument to define the output folder #385

stondini opened this issue Jul 6, 2022 · 2 comments

Comments

@stondini
Copy link

stondini commented Jul 6, 2022

Hello,

It may be useful for Typescript developers to have the ability to generate the Javascript + Typescript definition files in a specific folder in order to avoid them in src folder (which is the current output folder).

For instance, the following command generates the files at the same place as the ohm grammar source files.
ohm generateBundles --withTypes src/ohm/*.ohm

It could be great to have an additional argument to specify the output folder:
ohm generateBundles --withTypes src/ohm/*.ohm --output dist/ohm

What do you think ?

Thank you.
Stephane

@pdubroy
Copy link
Contributor

pdubroy commented Jul 8, 2022

Agreed! My instinct would be to make this behave the same way as TypeScript's outDir arg, and preserve the directory structure of the original files. Does this seem like the right choice?

@stondini
Copy link
Author

stondini commented Jul 9, 2022

Yes it sounds good.
It could be the default behaviour and stil keep --output argument to override it in case of special situations.

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

No branches or pull requests

2 participants