Update rollup-plugin-lezer.js #18

Closed
Dandada1993 wants to merge 2 commits from rollup-exportName into main
Dandada1993 commented 2024-01-08 01:47:26 +01:00 (Migrated from github.com)

Added exportName parameter to the lezer rollup function. The lezer generator command line tool allows for an "--export" parameter that allows control of the name exported from the grammar. The rollup tool did not support that parameter.

Added exportName parameter to the lezer rollup function. The lezer generator command line tool allows for an "--export" parameter that allows control of the name exported from the grammar. The rollup tool did not support that parameter.
marijnh commented 2024-01-08 11:12:00 +01:00 (Migrated from github.com)

Could you please wrap this argument in a config object (config = {}), so that if we add more options later they don't become a mess of positional parameters?

Could you please wrap this argument in a `config` object (`config = {}`), so that if we add more options later they don't become a mess of positional parameters?
Dandada1993 commented 2024-01-08 13:19:44 +01:00 (Migrated from github.com)

Noted. In addition to "exportName", do you want me to include the other options as well "moduleStyle", "includeNames", and "typeScript".

Noted. In addition to "exportName", do you want me to include the other options as well "moduleStyle", "includeNames", and "typeScript".
marijnh commented 2024-01-08 13:20:55 +01:00 (Migrated from github.com)

No -- the output here is for Rollup, which always wants ES modules, no CJS or TypeScript.

No -- the output here is for Rollup, which always wants ES modules, no CJS or TypeScript.
Dandada1993 commented 2024-01-08 13:30:41 +01:00 (Migrated from github.com)

Completed wrapping exportName in config object.

Completed wrapping exportName in config object.
marijnh commented 2024-01-08 13:35:21 +01:00 (Migrated from github.com)

I've pushed an alternative patch that adds a note to the readme and doesn't do odd undefined || things.

I've pushed an alternative patch that adds a note to the readme and doesn't do odd `undefined ||` things.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/generator!18
No description provided.