Package Exports
- @microsoft/teams-js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@microsoft/teams-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Microsoft Teams JavaScript Library
This JavaScript library is part of the Microsoft Teams developer platform. For documentation, see Reference: Microsoft Teams JavaScript library.
Getting Started
- Clone the repo
- Navigate to the repo root
yarn installgulp
Installation
Development
This assumes you are using npm as your package manager.
To install the stable version:
npm install --save @microsoft/teams-js
Production
You can access these files on unpkg, download them, or point your package manager to them.
Usage
JavaScript
Reference the library inside of your .html page using:
<!-- Microsoft Teams JavaScript API (via CDN) -->
<script src="https://unpkg.com/@microsoft/teams-js@1.2.1/dist/MicrosoftTeams.min.js"></script>
<!-- Microsoft Teams JavaScript API (via npm) -->
<script src="node_modules/@microsoft/teams-js@1.2.1/dist/MicrosoftTeams.min.js"></script>
<!-- Microsoft Teams JavaScript API (via local) -->
<script src="MicrosoftTeams.min.js"></script>TypeScript
If you are just referencing the library using a script tag then make sure to set your moduleResolution to node in your tsconfig.json to pickup the intellisense automatically. You will need to install the package via npm install @microsoft/teams-js.
If you are using any dependency loader such as RequireJS or SystemJS or module bundler such as browserify, webpack, you can use TypeScript import syntax to import specific modules. For e.g.
import * as microsoftTeams from '@microsoft/microsoft-teams-library-js';
## Contributing
We strongly welcome and encourage contributions to this project. Please read the [contributor's guide](CONTRIBUTING.md).
- - -
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.