Yeoman generator for SharePoint client-side applications
Yeoman generator for SharePoint - lets you quickly set up a project with sensible defaults for pulling and pushing files between SharePoint asset library and local projects sources.
Generated project allows immediately start developing SharePoint client-side solutions in Visual Studio Code or any other editor with instant publishing changes to SharePoint web site and downloading specific assets from SP Document library folder to local project assets which can be enforced with Git Diff algorithm for tracking changes.
- Code base has been migrated to TypeScript
- Custom Gulp tasks support has been added
- Generator has been migrated to a new version of Yeoman framework
- Yarn is integrated as a default package manager
- SharePoint build tasks has been migrated to
sp-build-tasks
- Auth wizard system has been migrated to
node-sp-auth-config
- Live reload functionality is integrated
- Dynamic configuration helpers
- SharePoint Online
- SharePoint 2013
- SharePoint 2016
To use Yeoman, one need to has Node.js and NPM installed on the computer. Basic installation process description can be found in this blog post.
Alter Node.js and NPM are staffed, install Gulp
, Yeoman
and generator-sppp
globally in your Node.js environment.
npm install -g gulp yo generator-sppp
Make a new directory or clone a blank Git project of your own and navigate to the created folder.
Inside project directory execulte:
yo sppp
Then follow the the Yoman wizard instructions:
Now you can run gulp sppull task:
gulp pull
It will deliver all files from assets folder from SharePoint to local directory.
Run gulp watch task before starting editing files:
gulp watch
On files change they are uploaded and published to SharePoint with use of gulp-spsave.
For publishing all .src project files, push
task can be used:
gulp push
Available tasks list:
gulp --tasks
gulp config
Checks basic minimal configs and prompts on configuration missing.
gulp live
Check sp-live-reload project page more information.
- sppull library is used for downloading files from SharePoint
- gulp-spsave library is used for saving files to SharePoint
- sp-request and node-sp-auth are in charge for low level communication with SharePoint
- sp-live-reload library is used for instantaneous page reload
- node-so-auth-config authentication config wizard
- sp-build-tasks build tasks tool-belt
Communication layer settings are stored in ./config/private.json
, parameters settings description can be found here.