README
fusion-plugin-web-app-manifest
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
}