Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 2.66 KB

File metadata and controls

66 lines (47 loc) · 2.66 KB

Pelion Device Management SDK for JavaScript

License version CircleCI codecov engine downloads

The Pelion Device Management SDK provides a simplified interface to the Pelion Device Management APIs by exposing functionality using conventions and paradigms familiar to JavaScript developers.

Prerequisites

Node.js > v10.16.0 (lts), which includes npm.

Installation

The SDK is distributed using npm. To install the package in your project:

$ npm install mbed-cloud-sdk

/node_modules/mbed-cloud-sdk now contains:

  • bundles - minified browser scripts.
  • lib - CommonJS modules.
  • lib-es6 - ESNext modules.
  • types - Typescript types.

Consuming in a Typescript project

To consume the SDK in a typescript project you must have the following declared in your tsconfig.json file.

{
    "compilerOptions": {
        "target": "es5", // es5 is the minimum but anything higher will be ok.
        "module": "commonjs", // commonjs will work for all targets es5 or above
        "moduleResolution": "node", // If module is es2015 or higher, then this is needed.
        "lib": [
            "dom",
            "es5",
            "es2015.promise",
            "es2015.symbol.wellknown",
            "es2015.core"
        ], // These are the library files required to build the SDK.
    }
}

Documentation and examples

See the full documentation and API reference at https://cloud.mbed.com/docs/latest/mbed-cloud-sdk-javascript.

Please refer to the examples folder for some node and web examples.

Contributing

Pelion Device Management SDK for JavaScript is open source and we would like your help; there is a brief guide on how to get started in CONTRIBUTING.md.

License

Pelion Device Management SDK for JavaScript is free-to-use and licensed under the Apache License 2.0. See LICENSE file for more information.