rushstack
rushstack copied to clipboard
[rush] VSCode Extension
Summary
RushStack VSCode Extention
Details
Fixes https://github.com/microsoft/rushstack/issues/3157
How to develop in local
- Prepare
rush update
rush build --to rushstack
- Run predefined launcher in your VSCode

- Play in Extension Host
a [Extension Development Host] window should popup if everything works fine. Open a rush project now



How to pack a production version and install it locally
Run the following command, a vsix format file called "rushstack-0.0.0.vsix" will be generated.
cd vsce/vscode-extension
rushx package
Run code --install-extension rushstack-0.0.0.vsix to install the prod version of rushstack vscode extension
Run code --uninstall-extension rushstack to uninstall it
Recipe: code --uninstall-extension rushstack || true && code --install-extension rushstack-0.0.0.vsix
Questions 2022/3/3
-
The way to get
RushConfigurationandRushCommandLineParser1.1RushConfigurationis used to extract projects. 1.2RushCommandLineParseris used to extract Rush commands and parameters For now, the idea is leveragerush-sdk, makingrush-sdksupports reload from another location, may related with https://github.com/microsoft/rushstack/pull/3212 -
rush addis a smart CLI, it uses the working directory (cwd) to decide the target project where the package should be installed to. It can be hardcode in Extension side likerush addpush a project selector, or involving sth like a parameter configuration to make it as a canonical use case.
Note: PR #3337 has renamed our GitHub master branch to main. This should not affect your pull request, but we recommend to redo your git clone to avoid confusion with the old branch name.
Thanks to the hints from David's PR: https://github.com/microsoft/rushstack/pull/3651
I updated the building and packing process to rushstack vscode extension
Now, in extension development, it will be always try to load @microsoft/rush-lib first, while in a production version of extension, it will try to load @rushstack/rush-sdk from current workspace folders.
Also, this extension can be correctly packed to a "visx" format file, which means it's ready to be published to VSCode marketplace!