Star in GitHub

SharePoint REST Framework

An easy way to develop against the SharePoint 2013/Online REST API

Back

SharePoint Automation

The “SharePoint Configuration” class allows the developer to define configuration files, to automate the installation/unintallation of SharePoint assets. The configuration options are available through the built-in intellisense, shown below. This configuration class contains built-in methods to install and uninstall the SharePoint assets. Refer to the Code Examples for examples of using this class.

Code Examples

SharePoint Enumerator Types

Demo

Automation

Configuration File

Intellisense is available for defining the custom properties of the various field types.

Separate Components

The ability to bundle or seperate the asset configurations is easy to setup. This allows the configuration to target all components or a single type. This allows the solution to be flexible to support various requirements. The configuration below, allows the solution to target either the web or site collection.

/**
 * Test Configuration
 */
export const Configuration = {
    // Custom Action
    CustomAction: (targetSiteCollection:boolean = true) => {
      // See if we are deploying this against the site collection
      if(targetSiteCollection) {
        // Target the site
        return new Helpler.SPConfig({
          CustomActionCfg: {
            Site: [
              { ... }
            ]
          }
        });
      }

      // Target the web
      return new Helpler.SPConfig({
        CustomActionCfg: {
          Web: [
            { ... }
          ]
        }
      });
    }

SPConfig Class

Constructor

Methods

install
uninstall

Properties