@pandacss/postcss
Advanced tools
Comparing version 0.0.0-dev-20241018171117 to 0.0.0-dev-20241022220846
@@ -0,1 +1,2 @@ | ||
import { Builder } from '@pandacss/node'; | ||
import { PluginCreator } from 'postcss'; | ||
@@ -10,4 +11,5 @@ | ||
declare const loadConfig: () => any; | ||
declare const builder: Builder; | ||
declare const pandacss: PluginCreator<PluginOptions>; | ||
export { type PluginOptions, pandacss as default, loadConfig, pandacss }; | ||
export { type PluginOptions, builder, pandacss as default, loadConfig, pandacss }; |
@@ -33,2 +33,3 @@ "use strict"; | ||
__export(src_exports, { | ||
builder: () => builder, | ||
default: () => src_default, | ||
@@ -48,2 +49,3 @@ loadConfig: () => loadConfig, | ||
var builder = new import_node.Builder(); | ||
var builderGuard; | ||
var pandacss = (options = {}) => { | ||
@@ -54,28 +56,33 @@ const { configPath, cwd, logfile, allow } = options; | ||
} | ||
const postcssProcess = async function(root, result) { | ||
const fileName = result.opts.from; | ||
const skip = shouldSkip(fileName, allow); | ||
if (skip) | ||
return; | ||
await builder.setup({ configPath, cwd }); | ||
if (!builder.isValidRoot(root)) | ||
return; | ||
await builder.emit(); | ||
builder.extract(); | ||
builder.registerDependency((dep) => { | ||
result.messages.push({ | ||
...dep, | ||
plugin: PLUGIN_NAME, | ||
parent: result.opts.from | ||
}); | ||
}); | ||
builder.write(root); | ||
root.walk((node) => { | ||
if (!node.source) { | ||
node.source = root.source; | ||
} | ||
}); | ||
}; | ||
return { | ||
postcssPlugin: PLUGIN_NAME, | ||
plugins: [ | ||
async function(root, result) { | ||
const fileName = result.opts.from; | ||
const skip = shouldSkip(fileName, allow); | ||
if (skip) | ||
return; | ||
await builder.setup({ configPath, cwd }); | ||
if (!builder.isValidRoot(root)) | ||
return; | ||
await builder.emit(); | ||
builder.extract(); | ||
builder.registerDependency((dep) => { | ||
result.messages.push({ | ||
...dep, | ||
plugin: PLUGIN_NAME, | ||
parent: result.opts.from | ||
}); | ||
}); | ||
builder.write(root); | ||
root.walk((node) => { | ||
if (!node.source) { | ||
node.source = root.source; | ||
} | ||
}); | ||
function(...args) { | ||
builderGuard = Promise.resolve(builderGuard).catch(() => { | ||
}).then(() => postcssProcess(...args)); | ||
return builderGuard; | ||
} | ||
@@ -103,4 +110,5 @@ ] | ||
0 && (module.exports = { | ||
builder, | ||
loadConfig, | ||
pandacss | ||
}); |
{ | ||
"name": "@pandacss/postcss", | ||
"version": "0.0.0-dev-20241018171117", | ||
"version": "0.0.0-dev-20241022220846", | ||
"description": "PostCSS integration for Panda CSS", | ||
@@ -36,6 +36,6 @@ "main": "dist/index.js", | ||
"postcss": "8.4.47", | ||
"@pandacss/node": "0.0.0-dev-20241018171117" | ||
"@pandacss/node": "0.0.0-dev-20241022220846" | ||
}, | ||
"devDependencies": { | ||
"@pandacss/logger": "0.0.0-dev-20241018171117" | ||
"@pandacss/logger": "0.0.0-dev-20241022220846" | ||
}, | ||
@@ -42,0 +42,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9068
200
+ Added@pandacss/config@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/core@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/extractor@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/generator@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/logger@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/node@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/parser@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/preset-base@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/preset-panda@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/shared@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/token-dictionary@0.0.0-dev-20241022220846(transitive)
+ Added@pandacss/types@0.0.0-dev-20241022220846(transitive)
- Removed@pandacss/config@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/core@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/extractor@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/generator@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/logger@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/node@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/parser@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/preset-base@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/preset-panda@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/shared@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/token-dictionary@0.0.0-dev-20241018171117(transitive)
- Removed@pandacss/types@0.0.0-dev-20241018171117(transitive)