Socket
Socket
Sign inDemoInstall

lib-pwa-engine

Package Overview
Dependencies
7
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lib-pwa-engine

This is revisied version of AppController from current template-pwa, this is the interface which available for [shell's manifest](#manifest). AppController #### mountLang(shellName) + `shellName` <[String]> + returns <[Promise]> #### mountTemplate(shellNa


Version published
Weekly downloads
1
Maintainers
1
Install size
121 kB
Created
Weekly downloads
 

Readme

Source

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
  • returns <[Promise].<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]>

FAQs

Last updated on 04 Jul 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc