()
| 185 | |
| 186 | // 8. Validate generated content |
| 187 | const validateBuild = () => { |
| 188 | const content = fs.readFileSync(INDEX_MD_PATH, 'utf8'); |
| 189 | |
| 190 | if (!content || content.trim().length === 0) { |
| 191 | handleError("Generated file is empty or does not exist"); |
| 192 | } |
| 193 | |
| 194 | if (!content.includes('AppSearch')) { |
| 195 | logWarn("AppSearch component not found in generated file"); |
| 196 | } |
| 197 | |
| 198 | if (!content.includes('app-search-content')) { |
| 199 | logWarn("Content wrapper not found in generated file"); |
| 200 | } |
| 201 | |
| 202 | const lineCount = content.split('\n').length; |
| 203 | if (lineCount < 100) { |
| 204 | logWarn(`Generated file seems too short (only ${lineCount} lines)`); |
| 205 | } |
| 206 | |
| 207 | logInfo("Build validation completed"); |
| 208 | }; |
| 209 | |
| 210 | validateBuild(); |
| 211 |
no test coverage detected