feat(cli): add --multi-output option for separate grammar compilation#651
Merged
hildjj merged 2 commits intopeggyjs:mainfrom Dec 14, 2025
Merged
feat(cli): add --multi-output option for separate grammar compilation#651hildjj merged 2 commits intopeggyjs:mainfrom
hildjj merged 2 commits intopeggyjs:mainfrom
Conversation
Add --multi-output <dir> CLI option that compiles multiple input grammars to separate output files instead of merging them into a single parser. - Conflicts with --output (mutually exclusive) - Cannot be used with stdin input - Works with --dts and --source-map (generates per-file) Closes peggyjs#650
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #651 +/- ##
=======================================
Coverage 99.48% 99.48%
=======================================
Files 34 34
Lines 4283 4313 +30
=======================================
+ Hits 4261 4291 +30
Misses 22 22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Will do a full review tomorrow, probably. In the meantime, it should be relatively easy to add coverage for the two lines that codecov flagged. |
Contributor
Author
Done |
Contributor
|
LGTM. Fantastic patch, thank you very much. |
Contributor
|
To be release in Peggy 5.1, hopefully this week. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
--multi-output <dir>CLI option that compiles multiple input grammars to separate output files instead of merging them into a single parser.Changes
--multi-output <dir>option to CLI with.conflicts("output")run()methodUsage
Test plan
Closes #650