@cwi/sp-publish

1.4.1 • Public • Published

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

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @cwi/sp-publish

    Weekly Downloads

    12

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    6.05 kB

    Total Files

    3

    Last publish

    Collaborators

    • joao.albernaz
    • magno
    • leunardo
    • joaosilveira
    • pablo.garcia
    • rafaelbueno
    • julialuz
    • paulosteffenm