Skip to content

SkygearIO/skygear-SDK-JS

Repository files navigation

Skygear SDK for JavaScript

@skygear/web @skygear/web @skygear/node-client @skygear/node-client @skygear/react-native @skygear/react-native Build Status License

Documentation

View the API Reference at https://skygeario.github.io/skygear-SDK-JS/.

Usage

Web

$ npm install --save @skygear/web

Node

$ npm install --save @skygear/node-client

React Native

$ npm install --save @skygear/react-native

Script Tag

https://unpkg.com/@skygear/web@latest/dist/skygear-web.iife.js

Replace latest with the version you want to use.

Running the example

The example assumes a local DNS server that is able to resolve .localhost. On macOS, you can install dnsmasq.

$ git clone --branch next https://github.com/SkygearIO/skygear-SDK-JS.git
$ cd skygear-SDK-JS
$ npm install
$ npm run lerna bootstrap
$ npm run build
$ npm run example

Running example with custom gears endpoint

$ SKYGEAR_APP_ENDPOINT=<endpoint> \
$ SKYGEAR_AUTH_ENDPOINT=<auth_endpoint> \
$ SKYGEAR_ASSET_ENDPOINT=<asset_endpoint> \
$ SKYGEAR_CLIENT_ID=<clientid> \
$ npm run example

Contributing

First, fork the repository.

$ git clone --branch next git@github.com:<myusername>/skygear-SDK-JS.git
$ cd skygear-SDK-JS
$ npm install
$ npm run lerna bootstrap

Releasing

First, ensure github-release and yarn tool is installed. Also, Git should be configured to be able to sign using GPG keys, and npm should be logged in as appropriate user.

$ npm run prepare-new-release
# Edit the file new-release.
# It will be prepended to CHANGELOG.md
# So make sure the style is consistent.
$ vim new-release
$ GIT_USER=<github-username> GITHUB_TOKEN=<github-token> GIT_BRANCH=master SKYGEAR_VERSION=<new-version> ./scripts/release.sh