MCPcopy Create free account
hub / github.com/TanStack/cli / createOptions

Function createOptions

packages/create/src/add-to-app.ts:38–60  ·  view source on GitHub ↗
(
  json: PersistedOptions,
  addOns: Array<string>,
  targetDir: string,
)

Source from the content-addressed store, hash-verified

36}
37
38async function createOptions(
39 json: PersistedOptions,
40 addOns: Array<string>,
41 targetDir: string,
42): Promise<Options> {
43 const framework = getFrameworkById(json.framework)
44
45 const starter = json.starter ? await loadStarter(json.starter) : undefined
46
47 return {
48 ...json,
49 framework,
50 tailwind: true,
51 addOns: true,
52 chosenAddOns: await finalizeAddOns(framework!, json.mode!, [
53 ...json.chosenAddOns,
54 ...addOns,
55 ]),
56 targetDir,
57 starter,
58 intent: json.intent ?? false,
59 } as Options
60}
61
62async function runCreateApp(options: Required<Options>) {
63 const { environment, output } = createMemoryEnvironment(options.targetDir)

Callers 2

runNewCommandsFunction · 0.85
addToAppFunction · 0.85

Calls 3

loadStarterFunction · 0.85
getFrameworkByIdFunction · 0.70
finalizeAddOnsFunction · 0.70

Tested by

no test coverage detected