Skip to content

feat(node): support CLI options.#1963

Merged
IWANABETHATGUY merged 19 commits intorolldown:mainfrom
7086cmd:feat/cli-options
Aug 14, 2024
Merged

feat(node): support CLI options.#1963
IWANABETHATGUY merged 19 commits intorolldown:mainfrom
7086cmd:feat/cli-options

Conversation

@7086cmd
Copy link
Copy Markdown
Contributor

@7086cmd 7086cmd commented Aug 12, 2024

resolves #1955.

This public relations campaign leverages the parseArgs function provided by the node:util module and the JSON schema generated by the zod library to automatically generate CLI options. This approach enhances the elegance and convenience of the process.

In my opinion, the runtime-generated schema is performance-degrading. While it is feasible to generate it during compilation via a plugin, it is currently too complex for this particular pull request, and also requires support TypeScript for config file.

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 12, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit ce88d18
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/66bc249ca5b0010008962d15

@7086cmd 7086cmd marked this pull request as ready for review August 12, 2024 15:00
@IWANABETHATGUY
Copy link
Copy Markdown
Member

review this after #1954 is solved.

@7086cmd 7086cmd changed the title feat: support CLI options. feat(node): support CLI options. Aug 13, 2024
@7086cmd 7086cmd marked this pull request as draft August 13, 2024 12:32
@7086cmd 7086cmd force-pushed the feat/cli-options branch 2 times, most recently from 4a74863 to 0125ee1 Compare August 13, 2024 13:20
@7086cmd 7086cmd marked this pull request as ready for review August 13, 2024 13:21
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Aug 14, 2024
@IWANABETHATGUY
Copy link
Copy Markdown
Member

Overall looks good, and could be polished in the future.

Merged via the queue into rolldown:main with commit 6d4ef7e Aug 14, 2024
@7086cmd 7086cmd deleted the feat/cli-options branch August 14, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rolldown/cli] Auto-Generate CLI Args from Options Schema

2 participants