chrishasz / spgo

SPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
https://www.chrishasz.com/spgo
MIT License
60 stars 11 forks source link
sharepoint sharepoint-online sharepoint-sites typescript visual-studio-code visual-studio-code-extension

SPGo for Visual Studio Code

SPGo allows you and your team to develop SharePoint web solutions from your local PC using the power of Visual Studio Code. Now you can build SharePoint sites and customizations source-control first with all of the power of a top-tier IDE. Produce cleaner code, deliver faster.

Learn More

You can view additional documentation on our documentation site.

Feedback

We love feedback! Please take a minute to complete our 2-question Survey and help make SPGo better!

Features

All of the great code authoring and management features of Visual Studio Code, plus the ability to...

Configuration and Getting Started

To get started using SPGo, press Ctrl+Shift+p (Windows) Cmd+Shift+p (Mac) or open the Command Pallet and type >SPGo: Configure Workspace to bring up the SPGo Configuration Wizard. Upon successful configuration, a new file will be created in the root of your project folder called spgo.json. From there, all files and folders created under the src folder in your local workspace will be deployed to their corresponding site-relative path your SharePoint site upon save.

SPGo.json Configuration Files

If configuration was successful, you should see a file similar to below:

{
    "sourceDirectory": "src",
    "sharePointSiteUrl": "https://tenant.sharepoint.com/sites/MyProject",
    "publishingScope": "SaveOnly",
    "authenticationType": "Digest"
}

Additional Configuration Options

Glob support for Publishing Workspace

Entering a Glob pattern into a node called publishWorkspaceGlobPattern will cause SPGo to publish only files which match this glob pattern. For example, if you use another VSCode plugin to minify files on save, you can configure the >SPGo: Publish local workspace command to publish all minified files in the workspace with the format <file>.min.<ext> by setting the publishWorkspaceGlobPattern property to /**/*.min.*.

Populating Remote Files

When you specify an array of remote folders in a node called remoteFolders, SPGo will recursively download the remote folder contents to your local workspace when you issue the Synchronize Files command >SPGo: Populate Workspace. Note: This WILL overwrite all local files.

Example Config json

{
    "authenticationType": "Digest",
    "checkInMessage" : "Your custom Check-in message here",
    "sourceDirectory": "src",
    "sharePointSiteUrl": "https://tenant.sharepoint.com/sites/MyProject",
    "publishingScope": "SaveOnly",
    "publishWorkspaceGlobPattern": "**/*.min.*",
    "remoteFolders": [
        "/SiteAssets/**/*",
        "/_catalogs/wp/",
        "/_catalogs/masterpage/"
    ]
}

Use

SPGo will automatically launch when you run the Configure Workspace command >SPGo: Configure workspace or any time the SPGO Configuration file spgo.json is detected in the root of the current workspace.

Security and Authentication Support

Credentials are stored in VSCode memory only. SPGo will only ask you for credentials the first time you sync with SharePoint each session. SPGo currently supports the following authentication modes:

How to get in touch

Write an email, create an issue on git, @ us on twitter or request support via Stack Overflow. Any way you choose, we embrace feedback and want to hear from you. Here's how to get a hold of us:

Issues

Please submit any issues or feature requests to https://github.com/chrishasz/SPGo/issues or, better yet, author a pull request.

Open Source

This project is offered under the MIT open source license. Collaboration, contribution, and feedback is welcomed and encouraged!

Thank You

I want to thank the following developers for inspiration and source packages: