fusion-plugin-web-app-manifest
TypeScript icon, indicating that this package has built-in type declarations

1.4.7 • Public • Published

fusion-plugin-web-app-manifest

Build status

Handles creating and returning a Web App Manifest(manifest.json) file for your Fusion app.


Table of contents


Installation

yarn add fusion-plugin-web-app-manifest

Setup

Create an Object to use for your manifest.json content.

// src/manifest.js
import { assetUrl } from 'fusion-core'

export default {
  short_name: 'Fusion App',
  name: 'Fusion App',
  start_url: '/',
  background_color: '#041725',
  display: 'standalone',
  theme_color: '#041725',
  icons: [
    {
      src: assetUrl('./icons/fusion-app-192.png'),
      type: 'image/png',
      size: '192x192',
    },
    {
      src: assetUrl('./icons/fusion-app-512.png'),
      type: 'image/png',
      size: '512x512',
    },
  ],
}

Register WebAppManifestToken with your manifest Object and register WebAppManifestPlugin for the __NODE__ env.

// src/main.js
import App from 'fusion-react'
import WebAppManifestPlugin, {
  WebAppManifestToken,
} from 'fusion-plugin-web-app-manifest'
import Manifest from './manifest
export default () => {
  const app = new App(root)
  if (__NODE__) {
    app.register(WebAppManifestToken, Manifest)
    app.register(WebAppManifestPlugin)
  }
  return app
}

Readme

Keywords

none

Package Sidebar

Install

npm i fusion-plugin-web-app-manifest

Weekly Downloads

82

Version

1.4.7

License

MIT

Unpacked Size

74.5 kB

Total Files

46

Last publish

Collaborators

  • fusion-ci