(path: string)
| 210 | } |
| 211 | |
| 212 | export async function checkRouteFile(path: string) { |
| 213 | const config = getConfig(); |
| 214 | let infoFile: string; |
| 215 | |
| 216 | switch (config.mode) { |
| 217 | case "qwikcity": |
| 218 | infoFile = path.split("/").slice(0, -1).concat("routeInfo.ts").join("/"); |
| 219 | break; |
| 220 | default: |
| 221 | infoFile = path.replace(/\.(js|jsx|ts|tsx)$/, ".info.ts"); |
| 222 | break; |
| 223 | } |
| 224 | const absPath = absoluteFilePath(config, infoFile); |
| 225 | if (!fs.existsSync(absPath)) { |
| 226 | await createInfoFile(config, path); |
| 227 | return true; |
| 228 | } |
| 229 | return false; |
| 230 | } |
| 231 | |
| 232 | export async function buildFiles(silent: boolean = false) { |
| 233 | const config = getConfig(); |
no test coverage detected