SPGo supports Multi-root Workspaces, so that you can work with multiple different Site Collections in a single VSCode workspace.
When laying out your workspace, each SharePoint Site Collection should be its own root folder. Example:
| --siteCollection1 | | | |--src | | | | | |--SiteAssets | | | | | | | |--main.js | | | | | | | |--main.css | |--spgo.json | --siteCollection2 | | | |--src | | | | | |--SiteAssets | | | | | | | |--main.js | | | | | | | |--additional.js | | | | | | | |--main.css | |--spgo.json
There are certain commands that can function across workspaces. In the event that there is no active workspace selected (based on the current file), then SPGo will present a menu to choose one of the folders in the workspace.
- Configure workspace
- Populate workspace
- Publish workspace
- Manually reload SPGo configuration
- Retrieve folder
The rest of the commands require that a file is either open/active in the code editor, or selected in the Tree-view control.
- Check out a file
- Compare file with server
- Delete file from server
- Discard checkout
- Publish a Major Version of a file
- Publish a Minor Version of a file
When determining which file to apply a file-scoped command, VSCode uses the following priority:
- The selected file in the Tree-view, if the command was activated from the Tree-view control.
- The active file in the VSCode workspace, falling back to the selected file in the Tree-view control.