generator-lcc-sharepointpnp
v1.2.0
Published
Basic PnP template scaffolding
Downloads
4
Readme
LCC SharePoint PnP Generator
Yeoman generator to scaffold a basic PnP provisioning template
Installation
Please install the following pre-requisites
Node.js will allow us to use the NPM package manager, but once installed we need to set the proxy to use it from the LCC corporate network
npm config set proxy http://<corporate-proxy>:<port>
npm config set http_proxy http://<corporate-proxy>:<port>
Next we have to install the NPM packages that we will use. These are Yeoman and generator-lcc-sharepointpnp. You should probably do this each time to make sure you get the latest generator-lcc-sharepointpnp. The following command will install these for us
npm install -g yo generator-lcc-sharepointpnp
Create a new directory for your project, then CD into it
mkdir lcc.pnpprojectname
cd lcc.pnpprojectname
Then generate your new project, following the prompts on-screen.
yo lcc-sharepointpnp
The generator will install the npm packages for you
If you have Visual Studio Code installed you can open the project in it by typing:
code .
Please see the readme file within the generated project for instructions on how to config and deploy the project.
If you're using this readme as a starter to scaffold your project, you need to read no further. The rest of this readme concerns itself with updating the generator.
Making changes to the generator
All the files the are created when using the generator to scaffold your project live in the templates folder
Publishing to NPM
Once you have updated anything in the generator, it needs a new NPM package generating so you can use the updated generator.
- Bump version in package.json – we use semantic versioning. NOTE: If this step is omitted, then when you commit and push your changes it will not generate new NPM packages for each of the output formats. Helpful when you are not ready to publish a new package but want to make sure your changes are source controlled.
- Commit changes and push to remote repository.
- Once pushed, a Travis CI build is kicked off that checks that the version has increased and if so will publish to the NPM registry.