create_manifest: Create a manifest for your shiny app

View source: R/pwa.R

create_manifestR Documentation

Create a manifest for your shiny app

Description

This is a central piece if you want to have your app standalone for instance

Usage

create_manifest(
  path,
  name = "My Progressive Web App",
  shortName = "My App",
  description = "What it does!",
  lang = "en-US",
  startUrl = "/",
  display = c("standalone", "minimal-ui", "fullscreen", "browser"),
  background_color = "#ffffff",
  theme_color = "#ffffff"
)

Arguments

path

App path.

name

App name.

shortName

App short name.

description

App description

lang

App language (en-US by default).

startUrl

Page to open at start.

display

Display mode. Choose among c("minimal-ui", "standalone", "fullscreen", "browser"). In practice, you want the standalone mode so that the app looks like a native app.

background_color

The background_color property is used on the splash screen when the application is first launched.

theme_color

The theme_color sets the color of the tool bar, and may be reflected in the app's preview in task switchers.

Value

This function creates a www folder for your shiny app. Must specify the path. It creates 1 folders to contain icons and the manifest.json file.

Note

See https://developer.mozilla.org/en-US/docs/Web/Manifest for more informations.

Examples

create_manifest(
  path = tempdir(),
  name = "My App",
  shortName = "My App",
  description = "What it does!",
  lang = "en-US",
  startUrl = "https://www.google.com/",
  display = "standalone",
  background_color = "#3367D6",
  theme_color = "#3367D6"
)

RinteRface/charpente documentation built on July 21, 2024, 9:28 a.m.