(html: string)
| 15 | type Framework = 'none' | 'react' | 'solid' | 'svelte'; |
| 16 | |
| 17 | const getImportMap = (html: string): {[specifier: string]: string} => |
| 18 | Object.assign( |
| 19 | {}, |
| 20 | ...(html |
| 21 | .match(IMPORT_MAP_SCRIPT_REGEX) |
| 22 | ?.map( |
| 23 | (script) => |
| 24 | JSON.parse( |
| 25 | script.replace(/^<script\b[^>]*>/, '').replace(/<\/script>$/, ''), |
| 26 | ).imports, |
| 27 | ) ?? []), |
| 28 | ); |
| 29 | |
| 30 | const getLess = (source: string): string => |
| 31 | prettier.format(source, {parser: 'less'}).trim(); |
no outgoing calls
no test coverage detected
searching dependent graphs…