To setup download/clone the repo and run the following commands at root
npm install
npm install -g yo gulp
npm install -g @microsoft/generator-sharepoint
Additional info for environment setup is available at link.
gulp clean
gulp bundle
gulp serve
This will launch the workbench where you can debug you web part.
gulp bundle --ship
gulp package-solution --ship
npm run package
Files to deploy will be available at path temp\deploy
and the package(*.sppkg) will be available at sharepoint\solution
path.
Make sure to update the cdnBasePath
at config\write-manifests.json
before deployment to the location where you have deployed your assets.
Additional info for deployment is available at link.
SPFx Documentation: link