Expand Minimize
This documentation is part of the BETA release and subject to change.

How to: Add support for analysis of SharePoint Framework projects from gulp and Visual Studio Code using the SPCAF Yeoman generator

This functionality is meant for use with SharePoint Framework projects.

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:

npm install generator-spcaf --global

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:

yo spcaf

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.

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.