[]previous and next page

resolveOptions

Fills in defaults and the implications between choices: - ui needs Tailwind, so it turns Tailwind on; - Clerk needs sign-in routes and Convex a page for its sample data, so a spa with either gets the router; - a Dusk-based template always has a router; - content, dashboard and api build in Vitest and ESLint (and dashboard shadow-ui with Tailwind), and refuse the add-ons that do not fit them (for example Convex, or Tailwind for api).

Fills in defaults and the implications between choices:

  • ui needs Tailwind, so it turns Tailwind on;
  • Clerk needs sign-in routes and Convex a page for its sample data, so a spa with either gets the router;
  • a Dusk-based template always has a router;
  • content, dashboard and api build in Vitest and ESLint (and dashboard shadow-ui with Tailwind), and refuse the add-ons that do not fit them (for example Convex, or Tailwind for api).

Import#

ts
import { resolveOptions } from "create-shadow-app";

Signature#

ts
function resolveOptions(options: ScaffoldOptions): ResolvedOptions

Parameters#

Name Description
options What the caller chose.

Returns#

Every choice as a boolean.

Throws#

  • Error for an unknown template or package manager, or for an add-on the template cannot take.

Examples#

ts
resolveOptions({ name: "app", ui: true }).tailwind; // true