lib-pwa-engine

0.0.9 • Public • Published

PWA-Engine proposal

API

AppController

  • config <[AppConfig]> - app configuration.
  • config <[AppConfig]> - app configuration. Example
import appConfig from './app_config.js'
import dataSource from './datasource.js'
 
new AppController(appConfig, dataSource);

mountLang(shellName)

  • shellName <[String]>
  • returns <[Promise]>

mountTemplate(shellName, templateName)

  • shellName <[String]>
  • templateName <[String]> - template name described in shell's index.js
  • returns <[Promise]>

localizeTemplate(shellName)

  • shellName <[String]>
  • returns <[Promise]>

unmountTemplate(shellName, templateName)

  • shellName <[String]>
  • templateName <[String]> - template name described in shell's index.js
  • returns <[Promise]>

mountScript(shellName, scriptName)

  • shellName <[String]>
  • scriptName <[String]> - filename of js file placed in shell's scripts folder
  • returns <[Promise]>

unmountStyle(shellName, styleName)

  • shellName <[String]>
  • styleName <[String]>
  • returns <[Promise]>

mountContainer(name, action)

  • name <[String]>
  • action <[Object]>
  • returns <[Promise]>

Requirements

Resource loaders

AppController requires you to provide resource loaders in config. You should provide async functions that returns Promise in config.resources, for next resources:

backend

container

  • name <[String]> - container's name
  • returns <[Promise]>

shell

  • name <[String]> - shell's name
  • returns <[Promise]>

lang

  • lang <[String]> - language
  • name <[String]> - file name
  • returns <[Promise]>

script

  • shell <[String]> - shell's name
  • name <[String]> - script's name
  • returns <[Promise]>

Backend

Object that provides at least next methods:

delegateAppController

  • controller <[Object]>

renderToRoot

  • container <[ReactRenderable]>
  • lang <[Object]>

dispatch

  • action <[Object]>

Readme

Keywords

none

Package Sidebar

Install

npm i lib-pwa-engine

Weekly Downloads

1

Version

0.0.9

License

MIT

Unpacked Size

124 kB

Total Files

17

Last publish

Collaborators

  • worldthirteen
  • pentatonica