({
options,
opts,
}: {
options: ParserOptions<T>
opts: TransformOptions<T>
})
| 213 | } |
| 214 | |
| 215 | async function loadTailwindCSS<T = any>({ |
| 216 | options, |
| 217 | opts, |
| 218 | }: { |
| 219 | options: ParserOptions<T> |
| 220 | opts: TransformOptions<T> |
| 221 | }): Promise<TransformerEnv> { |
| 222 | let parsers = opts.parsers |
| 223 | let parser = options.parser as string |
| 224 | |
| 225 | let context = await getTailwindConfig(options) |
| 226 | |
| 227 | let matcher = createMatcher(options, parser, { |
| 228 | staticAttrs: new Set(parsers[parser]?.staticAttrs ?? opts.staticAttrs ?? []), |
| 229 | dynamicAttrs: new Set(parsers[parser]?.dynamicAttrs ?? opts.dynamicAttrs ?? []), |
| 230 | functions: new Set(), |
| 231 | staticAttrsRegex: [], |
| 232 | dynamicAttrsRegex: [], |
| 233 | functionsRegex: [], |
| 234 | }) |
| 235 | |
| 236 | return { |
| 237 | context, |
| 238 | matcher, |
| 239 | options, |
| 240 | changes: [], |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | function transformAst<T = any>({ |
| 245 | ast, |
no test coverage detected
searching dependent graphs…