MCPcopy Create free account
hub / github.com/chakra-ui/panda / postcssProcess

Function postcssProcess

packages/postcss/src/index.ts:33–63  ·  view source on GitHub ↗
(root, result)

Source from the content-addressed store, hash-verified

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,

Callers 1

pandacssFunction · 0.85

Calls 2

shouldSkipFunction · 0.85
emitMethod · 0.80

Tested by

no test coverage detected