GithubHelp home page GithubHelp logo

htekdev / azure-devops-extension-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/azure-devops-extension-sdk

1.0 0.0 2.0 44 KB

Client SDK for developing Azure DevOps extensions

License: MIT License

JavaScript 6.03% TypeScript 93.97%

azure-devops-extension-sdk's Introduction

Azure DevOps Web Extension SDK

This repo was formed from azure-devops-extension-sdk.

This fork is done to support widgets with a deep intergration of the legacy package vss-web-extension-sdk into azure-devops-extension-sdk. There exists a PR but has not been merged yet. You can find more info here

Until this gets merged, you can use with the following:

  • npm install @htekdev/azure-devops-extension-sdk

Overview

Client SDK for developing Azure DevOps extensions.

The client SDK enables web extensions to communicate to the host frame. It can be used to:

  • Notify the host that the extension is loaded or has errors
  • Get basic contextual information about the current page (current user, host and extension information)
  • Get theme information
  • Obtain an authorization token to use in REST calls back to Azure DevOps
  • Get remote services offered by the host frame

A full API reference of can be found here.

Get started with a new extension

See the Develop a web extension for Azure DevOps documentation for instructions on getting started with a new extension. You can also refer to the azure-devops-extension-sample repository as a working reference.

Import the SDK within your extension project

  1. Add azure-devops-extension-sdk to the list of dependencies in your package.json
  2. Add import * as SDK from "azure-devops-extension-sdk" to your TypeScript code

Initialize the SDK

When you have rendered your extension content, call SDK.init(). Your extension content will not be displayed until you have notified the host frame that you are ready. There are two options for doing this:

  1. Call SDK.init() with no loaded option
  2. Call SDK.init({ loaded: false }) to start initializing the SDK. Then call SDK.notifyLoadSucceeded() once you have finished your initial rendering. This allows you to make other SDK calls while your content is still loading (and hidden behind a spinner).

Example:

import * as SDK from "azure-devops-extension-sdk";

SDK.init();

API

A full API reference of can be found here.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-devops-extension-sdk's People

Contributors

htekdev avatar misinformeddna avatar nkirchem avatar vadim-kovalyov avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.