

How to: Add support for analysis of SharePoint Framework projects from gulp and Visual Studio Code using the SPCAF Yeoman generator |
Running SPCAF analysis of your SharePoint Framework project from gulp and Visual Studio Code allows you to stay productive and easily check if there are any issues in your project. If any issues are found you can quickly fix them.
Before you can run SPCAF analysis of your SharePoint Framework project from gulp or Visual Studio Code you need to install the SPCAF Yeoman generator. Using the SPCAF Yeoman generator you can add support for running SPCAF analysis from gulp and Visual Studio Code to your existing SharePoint Framework project.
To install the SPCAF Yeoman generator on the command line execute:
This will install the SPCAF Yeoman generator on your computer and make it globally available for use across the different SharePoint Framework projects.
To add support for running SPCAF analysis from gulp and Visual Studio Code in the command line change the working directory to your SharePoint Framework project and then execute:

In the prompt verify that the listed path is where you have installed SPCAF. If you have installed SPCAF in a different location specify your own path instead.
During the installation process, the generator will update the following files:
- package.json
- gulpfile.js
- SharePointFramework.ruleset
- .vscode/tasks.json
Before modifying these files, the generator will create a backup copy in case you want to revert the files to their previous state.
After the generator completes, you will be able to run SPCAF analysis of your SharePoint Framework project from gulp and Visual Studio Code.