@liquid-state/iwa-desktop
TypeScript icon, indicating that this package has built-in type declarations

0.2.7 • Public • Published

IWA Desktop Environment

A set of functions and utilities to make it easy to run IWAs in a desktop environment. This can be used to run a full desktop version of an application in production or to make developing IWAs simpler by modelling native behaviours in a browser.

Basics

To get a simple working environment quickly you'll need to follow a few quick steps.

  1. Replace the communicator with the noopCommunicator from this package
import Desktop from '@liquid-state/iwa-desktop'

const app = createApp(definition, Desktop.createNoopCommunicator());
  1. Wrap the resulting communicator in the default middleware
Desktop.injectDefaultMiddleware(app.communicator);
  1. Add any additional middleware you need (eg config)
import { middleware } from '@liquid-state/iwa-desktop';
app.communicator.addOnSendMiddleware(middleware.config({
    AWS_REGION: 'us-east-2',
    AWS_USERPOOL_ID: 'abc123'
}));

Available middleware

OnSend

  • navigation (included in default)
  • config

OnRecieve

None

Readme

Keywords

none

Package Sidebar

Install

npm i @liquid-state/iwa-desktop

Weekly Downloads

11

Version

0.2.7

License

MIT

Unpacked Size

26.9 kB

Total Files

33

Last publish

Collaborators

  • coder-3
  • cdoussin
  • elsimir
  • incandesco