@pandacss/postcss 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ var pandacss = (options = {}) => {
|
|
|
48
48
|
(node) => driver.compiler.hasLayerDeclaration(`@layer ${node.params};`)
|
|
49
49
|
);
|
|
50
50
|
if (pandaLayerStatements.length === 0) return;
|
|
51
|
-
ensureCodegen(state, { cwd, outdir: options.outdir });
|
|
51
|
+
if (options.codegen !== false) ensureCodegen(state, { cwd, outdir: options.outdir });
|
|
52
52
|
syncProjectSources(state);
|
|
53
53
|
registerDependencies(driver, result, cwd, fileName);
|
|
54
54
|
emitDiagnostics(root, result, _nullishCoalesce(driver.designSystemDiagnostics, () => ( [])));
|
|
@@ -123,6 +123,12 @@ async function syncDriverState(state) {
|
|
|
123
123
|
}
|
|
124
124
|
function syncProjectSources(state) {
|
|
125
125
|
const files = state.driver.scan();
|
|
126
|
+
if (state.parsedSources.size === 0) {
|
|
127
|
+
if (files.length === 0) return;
|
|
128
|
+
for (const path of files) state.parsedSources.set(path, readFileStamp(path));
|
|
129
|
+
state.driver.parseFiles();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
126
132
|
const scanned = new Set(files);
|
|
127
133
|
const changes = [];
|
|
128
134
|
for (const path of state.parsedSources.keys()) {
|
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,8 @@ interface PluginOptions {
|
|
|
7
7
|
cwd?: string;
|
|
8
8
|
/** Where codegen artifacts are written. Defaults to the config `outdir`. */
|
|
9
9
|
outdir?: string;
|
|
10
|
+
/** Generate runtime helpers and types. Defaults to `true`. */
|
|
11
|
+
codegen?: boolean;
|
|
10
12
|
/** Allow selected `node_modules` CSS files through the processing guard. */
|
|
11
13
|
allow?: RegExp[];
|
|
12
14
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ interface PluginOptions {
|
|
|
7
7
|
cwd?: string;
|
|
8
8
|
/** Where codegen artifacts are written. Defaults to the config `outdir`. */
|
|
9
9
|
outdir?: string;
|
|
10
|
+
/** Generate runtime helpers and types. Defaults to `true`. */
|
|
11
|
+
codegen?: boolean;
|
|
10
12
|
/** Allow selected `node_modules` CSS files through the processing guard. */
|
|
11
13
|
allow?: RegExp[];
|
|
12
14
|
}
|
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var pandacss = (options = {}) => {
|
|
|
48
48
|
(node) => driver.compiler.hasLayerDeclaration(`@layer ${node.params};`)
|
|
49
49
|
);
|
|
50
50
|
if (pandaLayerStatements.length === 0) return;
|
|
51
|
-
ensureCodegen(state, { cwd, outdir: options.outdir });
|
|
51
|
+
if (options.codegen !== false) ensureCodegen(state, { cwd, outdir: options.outdir });
|
|
52
52
|
syncProjectSources(state);
|
|
53
53
|
registerDependencies(driver, result, cwd, fileName);
|
|
54
54
|
emitDiagnostics(root, result, driver.designSystemDiagnostics ?? []);
|
|
@@ -123,6 +123,12 @@ async function syncDriverState(state) {
|
|
|
123
123
|
}
|
|
124
124
|
function syncProjectSources(state) {
|
|
125
125
|
const files = state.driver.scan();
|
|
126
|
+
if (state.parsedSources.size === 0) {
|
|
127
|
+
if (files.length === 0) return;
|
|
128
|
+
for (const path of files) state.parsedSources.set(path, readFileStamp(path));
|
|
129
|
+
state.driver.parseFiles();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
126
132
|
const scanned = new Set(files);
|
|
127
133
|
const changes = [];
|
|
128
134
|
for (const path of state.parsedSources.keys()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/postcss",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "PostCSS plugin for Panda CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@pandacss/compiler": "2.
|
|
34
|
-
"@pandacss/compiler-shared": "2.
|
|
33
|
+
"@pandacss/compiler": "2.5.0",
|
|
34
|
+
"@pandacss/compiler-shared": "2.5.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"postcss": ">=8"
|