@cwi/sp-publish
v1.4.1
Published
Publish files to a SharePoint site
Downloads
220
Readme
SharePoint Publish CLI
The easiest CLI to publish files to SharePoint
Installation
npm install --save-dev @cwi/sp-publish
# for local usage create a .env file
echo 'SITE_URL=https://YourDomain.sharepoint.com/sites/YourSubsite/' >> .env
echo 'SHAREPOINT_USERNAME="YOUR_ACCOUNT"\nSHAREPOINT_PASSWORD="YOUR_PASSWORD"\nDEBUG=true\nCONTINUE_ON_ERROR=true' >> ../.env
Usage
# Publish files to "Site Assets" folder
sp-publish assets dist/ --username=YOUR_ACCOUNT --password=YOUR_PASSWORD
# Publish files to "Shared Documents" folder
sp-publish documents dist/ --username=YOUR_ACCOUNT --password=YOUR_PASSWORD
# Publish files to "Site Pages" folder
sp-publish pages dist/Home.aspx --username=YOUR_ACCOUNT --password=YOUR_PASSWORD
Debug
# Debug mode
sp-publish pages dist/Home.aspx --username=YOUR_ACCOUNT --password=YOUR_PASSWORD --debug
# Prevents the process from exiting on error
sp-publish pages dist/Home.aspx --username=YOUR_ACCOUNT --password=YOUR_PASSWORD --continue-on-error
With OAuth
Replace SHAREPOINT_USERNAME
value with your Client ID
, and SHAREPOINT_PASSWORD
with the Client Secret
.
sp-publish assets dist/ --username=CLIENT_ID --password=CLIENT_SECRET --oauth
Contributing
- Fork it!
- Create your feature branch
git checkout -b feature/my-new-feature
- Commit your changes
git commit -m "feat: add some feature"
- Push to the branch
git push origin feature/my-new-feature
- Submit a pull request
Security Vulnerabilities
If you discover a security vulnerability within this project, please send an e-mail to Magno Biét via [email protected]. All security vulnerabilities will be promptly addressed.
License
This package is licensed under the MIT license. Copyright © Magno Biét