1.4.1 • Published 2 years ago

@cwi/sp-publish v1.4.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

SharePoint Publish CLI

MIT Licence

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

  1. Fork it!
  2. Create your feature branch
    • git checkout -b feature/my-new-feature
  3. Commit your changes
    • git commit -m "feat: add some feature"
  4. Push to the branch
    • git push origin feature/my-new-feature
  5. 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 magno.biet@gmail.com. All security vulnerabilities will be promptly addressed.

License

This package is licensed under the MIT license. Copyright © Magno Biét

1.4.1

2 years ago

1.4.0

2 years ago

1.2.0

3 years ago

1.3.0

3 years ago

1.0.0

3 years ago