(config: Config, webDir?: string)
| 104 | } |
| 105 | |
| 106 | async function getWebDir(config: Config, webDir?: string) { |
| 107 | if (!webDir) { |
| 108 | const framework = detectFramework(config); |
| 109 | if (framework?.webDir) { |
| 110 | return framework.webDir; |
| 111 | } |
| 112 | |
| 113 | const answers = await logPrompt( |
| 114 | `${c.strong(`What is the web asset directory for your app?`)}\n` + |
| 115 | `This directory should contain the final ${c.strong('index.html')} of your app.`, |
| 116 | { |
| 117 | type: 'text', |
| 118 | name: 'webDir', |
| 119 | message: `Web asset directory`, |
| 120 | initial: config.app.webDir ? config.app.webDir : 'www', |
| 121 | }, |
| 122 | ); |
| 123 | return answers.webDir; |
| 124 | } |
| 125 | return webDir; |
| 126 | } |
| 127 | |
| 128 | async function runMergeConfig(config: Config, extConfig: ExternalConfig, type: 'json' | 'ts') { |
| 129 | const configDirectory = dirname(config.app.extConfigFilePath); |
no test coverage detected