This repository has the artifacts which is used by Arjun Menon in M365 Saturday Bangalore for the session Turbo-boost your SPFx upgrades and deployment
Session Link : M365 Saturday Bangalore
Agenda Link : Agenda
In this session, Arjun talks about CLI for Microsoft 365 and through the tool how you can turbo-boost your SPFx upgrades and deployment.
- Node.JS
- CLI for Microsoft 365
- Node Version Manager (NVM)
- For switching between Node.JS versions
- CodeTour VS Code Extension. Here is the link for the same
For the complete demo, we have used one of the PnP WebParts, which is available in the link.
Following are the demo which as showcased in the session.
Command : m365 spfx doctor
- Go to the Demo Folder : Source Original
- Run
npm install
to install the dependencies - Switch to an older Node Version (10.6.0)
- Run the command
m365 spfx doctor --output text
- It will show the result and the suggestions.
Here we will be upgrading the SPFx project from Version 1.12.0 to 1.13.0
Command : m365 spfx project upgrade
- Go to the Demo Folder : Source Original
- Run
npm install
to install the dependencies - Run the command
m365 spfx project upgrade --toVersion 1.13.0 --shell powershell --output md > "upgrade-report.md"
- You can also run
m365 spfx project upgrade --toVersion 1.13.0 --shell powershell --output tour
- The above will give the result in CodeTour format
- You can get more details on getting the result from this link
- You can also run
- It will show the result in the report format
- Execute the actions either one by one or via summary
- The sample of the upgraded project could be found from Source Upgraded
- Run
gulp build
Command : m365 spfx project upgrade
- Go to the Demo Folder : Source Upgraded
- Run
gulp bundle
- You can see some errors on the code
- Run the command
m365 spfx project doctor --output text
- Complete the actions mentioned in the report
- Run
gulp bundle
- You can see that the errors which was there after the upgrade is fixed now
The demo was planned to be shown based on the blog from here. You can follow the same steps which is explained on the blog. Here is the blog which you can follow : SPFx in CI/CD Pipeline