sp-dev-fx-webparts/samples/react-provision-assets
Hugo Bernier baf6cfb621
Merge pull request #4254 from pnp/dependabot/npm_and_yarn/samples/react-provision-assets/microsoft/sp-core-library-and-microsoft/sp-webpart-base-1.18.0
Bump the npm_and_yarn at /samples/react-provision-assets security update group in /samples/react-provision-assets with 2 updates
2023-10-25 21:01:55 -04:00
..
.devcontainer added remaining containers 2022-02-16 21:47:07 -05:00
assets Changed docs links to learn 2022-10-24 09:42:45 -04:00
config Removed web part from solution 2020-09-06 13:14:30 +00:00
sharepoint Renamed folder to assets-temp 2020-09-24 16:42:38 +00:00
typings
.editorconfig
.gitattributes
.gitignore
.npmignore
.yo-rc.json
README.md Updated telemetry link 2023-03-12 21:16:15 -04:00
gulpfile.js Renamed folder to assets-temp 2020-09-24 16:42:38 +00:00
package-lock.json Merge pull request #4254 from pnp/dependabot/npm_and_yarn/samples/react-provision-assets/microsoft/sp-core-library-and-microsoft/sp-webpart-base-1.18.0 2023-10-25 21:01:55 -04:00
package.json Bump the npm_and_yarn at /samples/react-provision-assets security update group 2023-10-25 22:08:25 +00:00
tsconfig.json
tslint.json
yarn.lock Merge pull request #4254 from pnp/dependabot/npm_and_yarn/samples/react-provision-assets/microsoft/sp-core-library-and-microsoft/sp-webpart-base-1.18.0 2023-10-25 21:01:55 -04:00

README.md

page_type products languages extensions
sample
office-sp
javascript
typescript
contentType technologies platforms createdDate
samples
SharePoint Framework
react
8/1/2017 12:00:00 AM

Provision SharePoint Assets with the SPFx solution package

Summary

This sample shows how we can provision Document Library, Custom List, Web and List PropertyBag properties, Site Columns, Content Types, Images, Site Page with the SFPx Client side web part and even prepopulated list and library items along with the SPFx solution package. All of the components can be deployed at once with the SPFx web part when the app is added to a SharePoint site. It also contains custom list and document library xml schemas.

The yammer search web part displayed in SharePoint online

Compatibility

⚠️ Important
Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.
Refer to https://aka.ms/spfx-matrix for more information on SPFx compatibility.

SPFx 1.1.0 Node.js v6 Compatible with SharePoint Online Compatible SharePoint 2019 Compatible with SharePoint 2016 (Feature Pack 2) Local Workbench Compatible Hosted Workbench Compatible Compatible with Remote Containers

Applies to

Prerequisites

  • Office 365 subscription with SharePoint Online.
  • SharePoint Framework development environment already set up.
  • Tenant admin access to the Office 365 subscription and App Catalog already setup.

Contributors

Version history

Version Date Comments
0.0.1 June 17, 2017 Initial commit

Minimal Path to Awesome

  • Clone this repository.
  • Open the command line, navigate to the web part folder and execute:
    • npm i
    • gulp build --ship
    • gulp prepare-solution This custom gulp task copies the file e89b5ad5-9ab5-4730-a66b-e1f68994598c.json from the folder sharepoint\assets-temp\ to temp\deploy in order to prepare the package.
    • gulp package-solution
    • Deploy the package to the app catalog
    • Add the app to a site

This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.

Features

This Web Part illustrates the following concepts on top of the SharePoint Framework:

  • SPFx provisioning based on the following Elements.xml nodes:
    • Custom List Instance with custom list schema.
    • Document Library Instance with custom list schema.
    • Content Types.
    • Fields.
    • Module with Images.
    • Module with Site Page.
    • PropertyBag properties.
    • Pre-populated List Data Rows in the Elements.xml.
    • Onet.xml specific tokens.

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.