Skip to content
Nikola Metulev edited this page Feb 4, 2021 · 14 revisions

Welcome

Welcome to the Microsoft Graph Toolkit Wiki. These pages are primarily intended for those who wish to contribute to the project by submitting bug reports, suggesting new features, building extensions, commenting on new ideas, or even by submitting pull requests.

Please refer to the sidebar (on the right) for details on Contributing.

If you are looking for more information on using Microsoft Graph Toolkit, please visit our Documentation and Component Playground!

Contributing to Microsoft Graph Toolkit

There are many ways to contribute to the Microsoft Graph Toolkit project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.

After cloning and building the repo, check out the issues list. Issues labeled help wanted are good issues to submit a PR for. Issues labeled good first issue are great candidates to pick up if you are in the code for the first time. If you are contributing significant changes, please discuss with the assignee of the issue first before starting to work on the issue.

Keep reading to get setup for contributing code to the Microsoft Graph Toolkit!

For more advanced topic, see the nav bar on the right.

Setup the development environment

Before cloning the repository, make sure you've installed the following prerequisites

Required (in this order)

  1. Git (latest version)

  2. Node.JS

    If planing to work on the @microsoft/mgt-sharepoint or @microsoft/mgt-spfx packages, please use nodejs v10.

    Otherwise, you should be able to use nodejs v12 or nodejs v14.

  3. yarn

in your favorite shell, run npm install -g yarn

Recommended

Clone and build the project

  1. Clone the repository and navigate to the project root.

    > git clone https://github.com/microsoftgraph/microsoft-graph-toolkit
    
    > cd microsoft-graph-toolkit
  2. Install all dependencies

    > yarn
  3. Build the project

    > yarn build

NOTE it will take few minutes to install all dependencies and build the project

Developing

There are two ways to "run" the project and test your changes. Both have pros and cons and you might find using them both as you are developing and testing changes.

1. yarn start

> yarn start

The main start script will spin up a basic web server and open the browser pointing to the index.html in the root of the repo. This script also will start up the typescript compiler in watch mode which will reload the page as you are changing the code.

Feel free to make changes to the index.html page as you are working, but please DO NOT check in any index.html changes in your PR as this would cause a lot of merge conflicts and would make index.html unusable for everyone. Because of this, we recommend using the start:storybook script below and writing stories that you can use for testing.

2. yarn start:storybook (RECOMMENDED)

> yarn start:storybook

This script will launch storybook, the local version of mgt.dev. It will also watch for any changes to the source files and reload the story as you are working. See Storybook for how to use storybook for development.