( json: PersistedOptions, addOns: Array<string>, targetDir: string, )
| 36 | } |
| 37 | |
| 38 | async 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 | |
| 62 | async function runCreateApp(options: Required<Options>) { |
| 63 | const { environment, output } = createMemoryEnvironment(options.targetDir) |
no test coverage detected