Socket
Book a DemoInstallSign in
Socket

generator-sp-pnp-js-sample

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-sp-pnp-js-sample

A sample project showing use of the Patterns and Practices js library and vs code

0.0.8
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

PnP SharePoint Sample Generator

This project contains a Yeoman generator which establishes a sample project to help you get started using the sp-pnp-js library.

Getting Started

Ensure you install Yeoman

> npm install -g yo

Install typings if you don't have it

> npm install -g typings

Install the Yeoman Generator

> npm install -g generator-sp-pnp-js-sample

Create a directory where you want to load the template

    > mkdir samples
    > cd samples

Run npm init and respond to prompts (defaults are fine)

> npm init

Run the generator

> yo sp-pnp-js-sample

Add the script tag and associated div to a script editor web part on your SharePoint site

    <script type="text/javascript" src="http://localhost:8080/bundle/example-bundle.js" data-divid="pnp-sample-container"></script>
    <div id="pnp-sample-container"></div>

Begin serving the samples by running this command:

> gulp serve

Refresh the page to see the hello world sample. You can un-comment the other samples and try them, or write your own code. This pattern can be used to write your own standalone apps. When changes are made to any of the files the bundle will be re-built for you and you can refresh the page to see your updates.

Build

You can also run the build command to create a minified bundle for deployment. It will be written to the build folder.

> gulp build

Keywords

sp-pnp-js

FAQs

Package last updated on 14 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.