Closed JohnnyMorganz closed 3 years ago
Thank you for the PR! I changed how it works slightly. Instead of adding separate commands to pick a specific file, we just assume the user wants to pick every time, and we add a new command that reuses the last picked file (this is the command that the Start Rojo button uses.)
Also added a few improvements for handling workspaces with multiple root folders. Previously, the user had to jump through two quick pick menus, now it collapses down into one and displays the workspace in the status bar.
Additionally, there is now a "Choose a different project file" button on the serve success message to allow users who clicked the button an easy way to pick a different file.
I decided to force the user to pick a project file, even if there is only one to pick from, to signal to the user that it's possible to pick a different file if they create one.
This PR implements the ability to choose the project file to use to serve a Rojo project.
Rojo: Start server using project file...
, which allows the user to serve Rojo using a different project file as a one off.rojo.projectFilePath
. The precedence of the project file selected goes: 1) Use the override project file if the "Start server using project file..." command is run 2) Use the configuration on the workspace for the project file to use. Falls back to the configuration set globally by the user for the path to use 3) Falls back to the default project file name (default.project.json
orrojo.json
for older versions of Rojo)When the user runs the one off command, they will be prompted if they would like to set this as the default project file to use when serving Rojo. This can either be set on the workspace, or set globally.
The Status icon on the bottom bar is also updated to also show the project file being used to serve, to let the user know what is being served. It will be formatted as
Rojo vXXX [filename.project.json]
A one off command for building is also implemented:
Rojo: Build place/model file using project file...
Closes #33
I did not add in the preconfigured priority check list as I felt the above commands would cover it, however I am happy to also add that in if you feel it is useful.
One thing: should the configuration project file path for serving and building be separated? Currently they are both linked to the same path, however it may be more useful to separate it (e.g.
default.project.json
for serving,build.project.json
for building). Also happy to do this if people agree