resolve_app_slug: Resolve the app slug

View source: R/utils.R

resolve_app_slugR Documentation

Resolve the app slug

Description

The slug is the app's identity. It names the package in package.json, the user data folder, the per-app caches under ⁠~/.shinyelectron⁠, and the installer files, and unless installer.app_id is set it also gives the app ID, which Windows installers and macOS use to recognize an installed copy. app.slug wins when set. Otherwise the slug comes from name, and then from the name of the app directory: when name is NULL, or, with a message, when it has no ASCII letters or digits.

Usage

resolve_app_slug(config, name, appdir)

Arguments

config

List. The effective configuration.

name

Character string or NULL. The name the slug comes from when app.slug is unset, such as the app_name argument of export().

appdir

Character string. The app directory.

Details

export() passes its app_name argument as name, so app.name in the configuration sets only the display name and never the slug, as in earlier releases: editing the display name never changes the app's identity.

Value

The slug, or NULL when neither name nor the directory gives one. It is not validated here; check_app_slug() does that before a build.


shinyelectron documentation built on Dec. 3, 2026, 9:07 a.m.