posit-dev / posit-dev/shinylive

Proposal: allow `runApp()` to accept object with `engine`

Open
#65 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
251
Forks
25
Avg merge
19m
Merged PRs (30d)
2

Description

Currently, when you call runApp() and pass in some files, you do this:

runApp(el, "viewer", { startFiles: files }, "r")

Where files has type Array<FileContent>.

But I think it makes as much sense for the object that's passed to runApp to contain information about which engine to use. Instead of just an array of files, it would also provide info about how to run the app. So the structure would be something like:

type AppSpec = {
  engine: AppEngine,
  files: Array<FileContent>
}

// This could be loaded from JSON
const app = { engine: "r", files = [ ... ] };

runApp(el, "viewer", { appSpec: app })

Unlike some of the other options engine seems inherent to the app; viewerHeight, for example, seems incidental to the app.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the runApp() entry point and tracing how its current file array and engine argument are handled. Compare that flow with the proposed AppSpec shape, including JSON-loaded app definitions, and identify the existing tests or examples that define runApp() behavior. Done means the supported input shape and engine selection are consistently specified and covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.