(root, result)
| 31 | stream = setLogStream({ cwd, logfile }) |
| 32 | } |
| 33 | const postcssProcess: TransformCallback = async function (root, result) { |
| 34 | const fileName = result.opts.from |
| 35 | |
| 36 | const skip = shouldSkip(fileName, allow) |
| 37 | if (skip) return |
| 38 | |
| 39 | await builder.setup({ configPath, cwd }) |
| 40 | |
| 41 | // ignore non-panda css file |
| 42 | if (!builder.isValidRoot(root)) return |
| 43 | |
| 44 | await builder.emit() |
| 45 | |
| 46 | builder.extract() |
| 47 | |
| 48 | builder.registerDependency((dep) => { |
| 49 | result.messages.push({ |
| 50 | ...dep, |
| 51 | plugin: PLUGIN_NAME, |
| 52 | parent: result.opts.from, |
| 53 | }) |
| 54 | }) |
| 55 | |
| 56 | builder.write(root) |
| 57 | |
| 58 | root.walk((node) => { |
| 59 | if (!node.source) { |
| 60 | node.source = root.source |
| 61 | } |
| 62 | }) |
| 63 | } |
| 64 | |
| 65 | return { |
| 66 | postcssPlugin: PLUGIN_NAME, |
no test coverage detected