@microsoft/teams-js
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0-beta.1 • Public • Published

    Microsoft Teams JavaScript client SDK

    Welcome to the Teams client SDK monorepo! For breaking changes, please refer to our changelog in the monorepo root.

    This JavaScript library is part of the Microsoft Teams developer platform. See full SDK reference documentation.

    Build Status Coverage Status

    Getting Started

    1. Clone the repo
    2. Navigate to the repo root and run yarn install
    3. yarn build from repo root
    4. to run Unit test yarn test

    TIP: whenever building or testing the Teams client SDK, you can run yarn build or yarn test from the packages/teams-js directory.

    Installation

    To install the latest 2.0 preview version:

    npm

    npm install --save @microsoft/teams-js@next

    yarn

    yarn add @microsoft/teams-js@next

    Production

    You can access these files on unpkg, download them, or point your package manager to them.

    Usage

    As a package

    Install either using npm or yarn.

    If you are using any dependency loader such as RequireJS or SystemJS or module bundler such as browserify, webpack, you can use import syntax to import specific modules. For e.g.

    import { app } from '@microsoft/teams-js';

    As a script tag

    Reference the SDK inside of your .html page using:

    <!-- Microsoft Teams JavaScript API (via CDN) -->
    <script
      src="https://res.cdn.office.net/teams-js/2.0.0-beta.1/js/MicrosoftTeams.min.js"
      integrity="sha384-tQzNKNgoXVyO8/7UVmwwNjKy8Cai2COqlhP7/hL4Jz5flCpugVVTzNWo3SnGEpH4"
      crossorigin="anonymous"
    ></script>
    
    <!-- Microsoft Teams JavaScript API (via npm) -->
    <script src="node_modules/@microsoft/teams-js@2.0.0-beta.1/dist/MicrosoftTeams.min.js"></script>
    
    <!-- Microsoft Teams JavaScript API (via local) -->
    <script src="MicrosoftTeams.min.js"></script>

    Dependencies

    Teams client SDK depends on Promise type. If you support older browsers and devices which may not yet provide it natively (e.g. IE 11), you need to provide a global polyfill, such as es6-promise, in your bundled application. If you're using a script tag to reference the Teams client SDK, you need to make sure the polyfill is included and initialized before the Teams client SDK is.

    Examples

    Stay tuned for examples coming soon.

    Testing

    The Teams Test App is used to validate the Teams client SDK APIs.

    Contributing

    We strongly welcome and encourage contributions to this project. Please read the contributor's guide.


    This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

    Keywords

    none

    Install

    npm i @microsoft/teams-js@2.0.0-beta.1

    Version

    2.0.0-beta.1

    License

    MIT

    Unpacked Size

    1.32 MB

    Total Files

    8

    Last publish

    Collaborators

    • microsoft1es
    • ydogandjiev
    • vsrdomain
    • saching
    • rohithj