Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lib-pwa-engine

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 04 Jul 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc