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

Embed grammar json in typescript file #142

Merged
merged 3 commits into from
Jul 2, 2021
Merged

Embed grammar json in typescript file #142

merged 3 commits into from
Jul 2, 2021

Conversation

msujew
Copy link
Member

@msujew msujew commented Jun 30, 2021

To facilitate easy use of the langium package without the need to always copy the grammar.json, we generate a TypeScript file that is easily embedded by webpack.

@msujew msujew requested a review from spoenemann June 30, 2021 10:13
Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How shall we handle cases like this, where we change the generated code so a file is no longer generated and used? Shall we include a "clean" step that deletes all files in the target directory? If yes, shall that be opt-in or opt-out via options?

@msujew msujew force-pushed the msujew/grammar-embed branch from b87d3cb to c9c4382 Compare July 2, 2021 09:43
@msujew msujew force-pushed the msujew/grammar-embed branch from c9c4382 to 3a60cba Compare July 2, 2021 09:50
@msujew msujew force-pushed the msujew/grammar-embed branch from 3a60cba to 5ff3b9f Compare July 2, 2021 09:52
@msujew
Copy link
Member Author

msujew commented Jul 2, 2021

I would say a cleanup step would be opt-out via the langium config options. Especially since the generated directory is usually git ignored, right?

@msujew msujew merged commit b8df86c into main Jul 2, 2021
@msujew msujew deleted the msujew/grammar-embed branch July 2, 2021 10:01
@spoenemann
Copy link
Contributor

Ok could you create an issue for that?

@spoenemann spoenemann added this to the v0.2.0 milestone Sep 15, 2021
@msujew msujew added the cli CLI related issue label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli CLI related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants