ordercity-sdk

3.0.8 • Public • Published

JS-SDK - Helper library to work with Ordercity API (REST API + geolocation API)

Using Ordercity SDK

Project has 3 different modes:

  1. Standalone, minified browser build (usable directly using <script> tag - exposes "ordercitySDK" global variable on the window object)
  2. Production npm build - available from npm registry using npm install ordercity-sdk - default export is the ordercitySDK variable
  3. Development build - using only for development, more details below

Working with the project

npm run dev - Starts the project in development mode:

SDK is already cofigured for development: webpack hot reload, API credentials, shopkey for testing shop, debug mode is on

Go to localhost:4000, open console, and test the SDK (e.g. ordercitySDK.getCategories({}).then(console.log) )

Deployment

Build should be hosted on CDN77 cdn.

When we make a new SDK version, we have to do several things:

  1. Increment package version in package.json, according to semantic versioning (major/minor/patch)
  2. Publish this new version to npm
  3. Build project (for different environments, npm run build:<env> )
  4. Deploy to firebase CDN77 hosting

Test: rsync -va ./dist/test/ user_qwe84qu1@push-20.cdn77.com:/www/sdk pw: 12j1z7kKzidt46bTlGQ0

Live: rsync -va ./dist/live/ user_xvfke1n1@push-20.cdn77.com:/www/sdk pw: 452nr8CHUhoGL9Di5AY0

Stage: rsync -va ./dist/stage/ user_q4rbi75g@push-20.cdn77.com:/www/sdk pw: r7OybSWl9Y9DsCxj8h3n

Package Sidebar

Install

npm i ordercity-sdk

Weekly Downloads

0

Version

3.0.8

License

MIT

Last publish

Collaborators

  • ordercity-admin
  • ordercity