(staticThemes: StaticTheme[])
| 237 | } |
| 238 | |
| 239 | export function formatStaticThemes(staticThemes: StaticTheme[]): string { |
| 240 | const themes = staticThemes.slice().sort((a, b) => compareURLPatterns(a.url[0], b.url[0])); |
| 241 | |
| 242 | return formatSitesFixesConfig(themes, { |
| 243 | props: Object.values(staticThemeCommands), |
| 244 | getPropCommandName: camelCaseToUpperCase, |
| 245 | formatPropValue: (prop, value) => { |
| 246 | if (prop === 'noCommon') { |
| 247 | return ''; |
| 248 | } |
| 249 | return formatArray(value as string[]).trim(); |
| 250 | }, |
| 251 | shouldIgnoreProp: (prop, value) => { |
| 252 | if (prop === 'noCommon') { |
| 253 | return !value; |
| 254 | } |
| 255 | return !(Array.isArray(value) && value.length > 0); |
| 256 | }, |
| 257 | }); |
| 258 | } |
no test coverage detected