0.0.5 • Published 3 years ago
js-miniapp-bridge v0.0.5
JS MiniApps SDK
JS bridge for iOS/Android platforms which uses Ionic Portals (https://ionic.io/docs/portals)
Usage
- Install package into project:
yarn add js-miniapp-bridgeornpm i js-miniapp-bridge - Import module in Web project, example:
import { SendMessage } from "js-miniapp-bridge"(https://github.com/mhushang/js-miniapp-sdk-examples/tree/main/web) - Available methods:
SendMessage, SubscribeToMessage, UnsubscribeFromMessage, GetInitialContext
Examples
- Web: (https://github.com/mhushang/js-miniapp-sdk-examples/tree/main/web)
- React Native (https://github.com/mhushang/js-miniapp-sdk-examples/tree/main/reactNative)
https://www.loom.com/share/12fa9842a713462eb3a9edade4985224
Available scripts of the library
The project contains the following scripts:
dev- starts dev serverbuild- generates the following bundles: CommonJS (.cjs) ESM (.mjs) and IIFE (.iife.js). The name of bundle is automatically taked frompackage.jsonname propertytest- starts jest and runs all teststest:coverage- starts jest and run all tests with code coverage reportlint:scripts- lint.tsfiles with eslintlint:styles- lint.cssand.scssfiles with stylelintformat:scripts- format.ts,.htmland.jsonfiles with prettierformat:styles- format.csand.scssfiles with stylelintformat- format all with prettier and stylelintprepare- script for setting up husky pre-commit hook