ProsperWorks App SDK

Travis branch npm Test Coverage Maintainability

The javascript SDK provides client-side functionalities for adding embedded app to the prosperworks web client.

Embedded app is an iframe embedded in the prosperworks web page. The display location of the iframe is configured in the embedded app setting page.


Use with your webpack/rollup/browserify etc.

yarn add pw-app-sdk
# or
npm install pw-app-sdk --save

Then you could just do

import PWSDK from 'pw-app-sdk';
const sdk = PWSDK.init();

  .then(({ context }) => {
    // do something with the context

Use with CDN

pw-app-sdk is served with

<script type="text/javascript" src=""></script>
<script type="text/javascript">
var sdk = window.PWSDK.init();
  .then(function (data) {
    var type = data.type; // person,lead,...
    var context = data.context;
    // do something with the context

SDK Docs



Before development, make sure you installed all packages. We are using yarn for this project.


Developing SDK

## watch changes
yarn dev:es
# or
yarn dev:commonjs

## build
yarn build

## test
yarn test
# or watch changes
yarn test:dev

## lint
yarn lint


How do I use my local SDK instead of the npm one?

You could do yarn link in this repo, and go to your other repo and do yarn link pw-app-sdk.

Alternatively, you could also do npm link path/to/pw-app/sdk in your repo.

results matching ""

    No results matching ""