-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
CLI for development #2915
Comments
a bad DX of using ./x before is that we need to go back to project root to execute this command, it would be better it could be executed in any package directory. |
Could we achieve this by making After |
It is also bad DX if you need to CD into directories for development. |
that's inevitable,I may need to debug some example so I need to cd to example directory |
we could just add the cli bin path to $PATH just like other cli does |
The examples are isolated packages, better to call their own package.json scripts? |
chore: setup ./x script using `zx` relates #2915
The script is done. We can just add commands as we go. |
chore: setup ./x script using `zx` relates web-infra-dev#2915
What problem does this feature solve?
Developing Rspack is harder than normal Node.js applications due to needing to have both Node.js and Rust installed and run.
It is tedious to look for commands related to both Node.js or Rust, it doesn't make sense to look for commands in either package.json scripts or cargo .cargo/config.toml or other documentation places.
In order to provide better developer experience, a development cli is needed to wrap all commands and provide useful help information.
We will unify all development workflow, GitHub workflows and documentation to this CLI.
Previously we had
./x
script but it didn't work on windows. This time we will bring it back, but change the underlying mechanism to usezx
.The CLI will use the
commander
library to provide the interface.What does the proposed API of configuration look like?
After this is done, we should be able to run
and it will display something like
subcommand
./x test --help
will displayThe text was updated successfully, but these errors were encountered: