Skip to content

Bity plugin for the Airbitz bitcoin wallet

Notifications You must be signed in to change notification settings

OmeGak/airbitz-bity-plugin

Repository files navigation

Airbitz plugin for Bity

Dev

Global dependencies

  • node.js, version >= 6.0.0
  • yarn

Install local dependencies

Run yarn in project root

Commands

  • yarn run dev - compile everything in 'dev' mode and run dev server on http://0.0.0.0:3000 (Linux) or http://127.0.0.0:3000 (other OSs)
  • yarn run dist - compile the release code
  • yarn run dist-abc - compile the release code for Airbitz/airbitz-plugins
  • yarn run lint - lint the code
  • yarn run test - run tests using karma in 'single-run' mode
  • yarn run test:watch - run tests using karma in 'watch' mode
  • yarn run ci - run sequence of yarn run lint, yarn run test, yarn run dist

Dev / airbitz-plugins API

see airbitz-plugins API

You can access the API, which is available in the file airbitz-core.js,
using one of these ways:

import 'airbitzPluginApi';

// do something
window.Airbitz.core.wallets();

or

import * as airbitz from 'airbitzPluginApi';

// do something
airbitz.core.wallets();

Dev / airbitz-plugins for different platforms

You can specify which bridge will be used using CLI parameter --env.platform.
It can take one of these values:

Therefore, you can use

  • yarn run dist -- --env.platform=web or yarn run dist in order to compile the application with airbitz-bridge-dev.js
  • yarn run dist -- --env.platform=ios in order to compile the application with airbitz-bridge-ios.js
  • yarn run dist -- --env.platform=android in order to compile the application with airbitz-bridge-android.js

Dev / Configuration of compiled application

There is directory $PROJECT_ROOT/config which contains config files.

  • dev.js contains configuration for development builds
  • prod.js contains configuration for production builds
  • default.js contains shared configuration

By default it uses this logic

  • yarn run dist - use $PROJECT_ROOT/config/prod.js
  • otherwise - use $PROJECT_ROOT/config/dev.js

You can override this using CLI parameter --env.config=$CONFIG_KEY.
For example,

  • use dev configuration for production build: yarn run dist -- --env.config=dev
  • use prod configuration for dev build: yarn run dev -- --env.config=prod

Dev / TODO

Now the application uses `react-redux@4.4.6 due to incompatibility of the latest react-redux-form with react-redux@5.*.
See this, this and this tickets

About

Bity plugin for the Airbitz bitcoin wallet

Resources

Stars

Watchers

Forks

Packages

No packages published