Skip to content

Getting Started with SharePoint Framework (SPFx)

SPFx Version: 1.16.1

Setting Up Sharepoint Framework

Setting up SharePoint Framework (SPFx) involves the following steps:

Prerequisites

  1. Install Node:
    Choose node installer according to your system from here
  2. Install VS Code from here
  3. Install Gulp, Yeoman and SharePoint
    Open cmd and type the following command
npm install gulp-cli yo @microsoft/generator-sharepoint --global

Creating Your First Solution

1. Open cmd and scaffold your solution type the following command

yo @microsoft/sharepoint

2. Select the following option in cmd and wait for modules to install

Bundling and shipping the solution

Once you are done with code changes, follow the following steps to bundle and ship the solution

1. Bundle the Solution

gulp bundle --ship

2. Package the solution

gulp package-solution --ship

A Sppkg package will be create in sharepoint\solution folder, which you can upload in App Catalog of your SharePoint Site.

Published inSharepointSharePoint Framework