Update SharePoint Framework Yeoman Generator

The SharePoint Framework Yeoman Generator is expected to continue to improve as Microsoft pushes changes to the Framework. As of the publish date of this post, we are up to code drop 6 (January 2017), which is in developer preview, but even once the Framework goes to GA, it is expected to continue on its evolutionary path with future updates.

To keep up to date, we need to ensure that our local development Yeoman generator also stays up to date. All we need to do is run “npm update” on the Yeoman generator and we are set at least on a global scale within our workstation. Your existing projects may need additional assistance for upgrading, but at least the generator will be up to date.

Update your SharePoint Framework Yeoman generator

You may run this command as often as you want, if there is no update, the command simply returns nothing.

1
C:\> npm update -g @microsoft/generator-sharepoint@latest

Check your SharePoint Framework Yeoman generator version

There are two methods I use to determine the current version of the Framework Yeoman generator, one checks the publicly available package, while a second is useful to determine what is currently installed on your workstation.

npm view

“npm view” returns information about the public package, by default the latest version. The “version” specifies we want to return the version field.

1
C:\> npm view @microsoft/generator-sharepoint version

npm list

“npm list” provides us information regarding the installed package on our workstation. The -g options specifies that we want information on the globally installed package.

1
C:\> npm list -g @microsoft/generator-sharepoint

In the example output below, I updated to the latest SharePoint Framework Yeoman Generator, then using both suggested commands to review the generator version number, I can see I have version 0.3.2 installed, which is the correct version as of Code Drop 6.

sharepoint-framework-generator-version

Verify at the source

If you really want to check what is stored over at the NPM community, check out the latest version listed at https://www.npmjs.com

https://www.npmjs.com/package/@microsoft/generator-sharepoint

Speak Your Mind

*


+ two = 6