-
Notifications
You must be signed in to change notification settings - Fork 6
Tasks
gulp --tasks├── config
├── pull
├── push
├── live-reload
├── masterpage
├── custom-actions
├── build
├── watch
├── live
├── clean
├── analyze
└── features:disable-mdsgulp configInits SharePoint credentials prompt wizard.
Wizard is implemented using node-sp-auth-config library.
After config is done, auth settings are dumped to './config/private.json'.
The second run of the task checks './config/private.json' and do not prompt if it exists and all parameters for a specific are auth strategy are provided.
To force prompts dialog use:
gulp config --initgulp pullInitiates download of all remote assets from spFolder to ./dist folder.
This task can be useful if one is intended to check if the assets in SharePoint had been changed since last publish or in migration scenarios when some assets are already created in SharePoint (with SharePoint Designer, for instance).
gulp buildBuild task combines multiple build actions, such as:
gulp build --prodUsed with Webpack build.
A specific subtasks can be provided as gulp build parameters:
| Parameter | Description |
|---|---|
| --webpack | webpack'ing .ts to single app.js buldle |
| --css-custom | bundling custom css (from .scss) |
| --copy-assets | copying static content |
| --js-libs | bundling JavaScript libraries |
| --css-libs | bundling CSS libraries or custom .css |
| --masterpage | .hbs to .masterpage |
| --layouts | .hbs to .aspx layouts |
| --webparts | compiles .hbs CEWPs |
gulp build --prod --webpack --webpartsStarts webparts and webpack tasks, also uses production build configs.
gulp pushUploads and publishes ./dist folder's content to remote spFolder in SharePoint.
The task uses gulp-spsave for delivering assets to SharePoint.
gulp watchWatches local files for changes and initiates build and publishing of changed sources.
The task watches for the following sources:
- src
- masterpage
- [watches masterpage .hbs]
- layouts
- [watches layouts.hbs files]
- scripts
- [watches for .ts files changes]
- styles
- [watches for .scss files changes]
- webpartc
- [watches for .hbs files changes]
- masterpage
gulp watch --prodgulp liveDoes the same as gulp watch, but also emits changed files paths within the live-reload local server.
Implements socket proactive reload using sp-live-reload library.
gulp masterpageApplies custom masterpage to the SPWeb.
gulp masterpage --uninstallgulp reloadInstalls live-reload client script globally on SPWeb as a User ScriptLink custom action.
gulp reload --uninstallRemove live-reload client script custom action from SPWeb.
gulp custom-actionsProvisions custom actions from app.json settings.
gulp custom-actions --uninstallRemoves custom actions based on project namespace prefix.
gulp cleanDeletes ./dist and temporary fonders.
gulp analyzeInitiates bundles analyzer.