JSPM

  • Created
  • Published
  • Downloads 115
  • Score
    100M100P100Q91537F
  • License MIT

SharePoint provisioning with pure JavaScript

Package Exports

  • sp-js-provisioning
  • sp-js-provisioning/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sp-js-provisioning) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sp-js-provisioning version

Description

This project is a SharePoint provisioning tool that uses the SharePoint Framework (SPFx) and Patterns & Practices (PnP) to provision SharePoint sites. It includes various handlers for provisioning different SharePoint components such as files, custom actions, and more.

Installation

To install the project, you need to have Node.js and npm installed on your machine. After that, you can clone the repository and install the dependencies:

git clone git://github.com/Puzzlepart/pnp-js-provisioning
cd pnp-js-provisioning
npm install

Usage

Add the npm packages to your project

npm install sp-js-provisioning --save

Here is an example of how you might define navigation in a provisioning template, first in XML and then in JSON (used by sp-js-provisioning).

XML:

<pnp:Navigation>
  <pnp:CurrentNavigation NavigationType="Structural">
    <pnp:StructuralNavigation RemoveExistingNodes="true">
      <pnp:NavigationNode Title="Home" Url="{site}" />
      <pnp:NavigationNode Title="About" Url="{site}/about" />
    </pnp:StructuralNavigation>
  </pnp:CurrentNavigation>
</pnp:Navigation>

JSON:

{
  "Navigation": {
    "CurrentNavigation": {
      "NavigationType": "Structural",
      "StructuralNavigation": {
        "RemoveExistingNodes": true,
        "NavigationNode": [
          {
            "Title": "Home",
            "Url": "{site}"
          },
          {
            "Title": "About",
            "Url": "{site}/about"
          }
        ]
      }
    }
  }
}

Contributing

Contributions are welcome. Please open an issue or submit a pull request on the GitHub repository.