Packaging SharePoint Framework solutions
Each SharePoint Framework solution will be packaged in order to deploy them to the SharePoint. As we want to deploy solutions in a clean and simple way, the tool we will use to build and package code is Gulp. This is the same command-line utility you've used to build and package code in earlier chapters before running a locally hosted copy of SharePoint Workbench.
Using Gulp to package a project
Gulp is accessible in VS Code using the Integrated Terminal, that you can access from View
| Integrated Terminal
. By typing gulp
without any extra parameters, Gulp will run a default task. You can also run gulp
from a Command Prompt or PowerShell window.
Tasks are described in a separate configuration file within the project folder called gulpfile.js
. It is rather small in the SPFx default project, as a lot of work is done through SPFx tooling (sp-build-web, for example), but it is more than sufficient for your typical needs as a developer:

Line 6 is key here...