@koala-live/browser v1.1.0
Koala SDK
Running locally
To start watching files for changes and run a dev server:
yarn devYou can now navigate to 127.0.0.1:8080 to test your changes. If you wish to automatically open the html page:
yarn dev --openVersions of the SDK
We push two versions of the sdk: the standalone version and the umd version. The "standalone" version is what typically ships to browsers via CDN and self-installs. The umd version attaches to the window object as well (in a browser environment) but must be manually initialized:
// if the umd script is loaded from CDN directly in the browser, you can find the module attached to `window.KoalaSDK`:
window.KoalaSDK.load({ project })
// or if you import it when using a bundler:
import * as KoalaSDK from '@koala-live/browser'
KoalaSDK.load({ project })To test the standalone version, you can yarn dev and navigate to http://localhost:8080/standalone.html?project=cardi-b
Deploying the Koala SDK
Requirements
awscli - follow the latest docs on installing the AWS CLI. Once installed, make sure you've configured it viaaws configure.
The Koala SDK is hosted on S3, and fronted by a Cloudflare Worker that acts as our CDN. To push a new version to S3:
yarn deployIt will push the latest build into the koala-sdk/latest bucket, as well as an immutable bucket associated with the current git sha: e.g. koala-sdk/e1b323d