Beginning of August 2018 I released a new Visual Studio Code extension called the SPFx Task Runner. This extension lets you run your SharePoint Framework related gulp tasks by just a couple of mouse clicks.
Once you installed the extension you get a new SPFx task group in the Visual Studio Code context menu. This menu group will be shown when a SharePoint Framework project is opened.
As you can see in the above screenshot it provides you with a couple of the most used/useful command:
- "SPFx start local server" results in running:
gulp serve --nobrowser
- "Create debug package" results in running:
gulp package-solutionafterwards to create the debug (pointing to your localhost) SPPKG file
- "Create release package" results in running:
gulp bundle --shipand
gulp package-solution --shipafterwards to create the release SPPKG file
The two other tasks allow to check the registered gulp tasks and to run them. Here is an example of how the Pick a task to run action works:
- Get the Visual Studio Code extension here: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-spfx-task-runner.
- Check out the code on the GitHub repository: https://github.com/estruyf/vscode-spfx-task-runner
- Got Feedback/ideas/issues, please create a new issue here: https://github.com/estruyf/vscode-spfx-task-runner/issues