@pandacss/postcss 0.29.1 → 0.30.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.d.mts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { PluginCreator } from 'postcss';
2
2
 
3
- declare const loadConfig: () => any;
4
- declare const pandacss: PluginCreator<{
3
+ interface PluginOptions {
5
4
  configPath?: string;
6
5
  cwd?: string;
7
- }>;
6
+ logfile?: string;
7
+ }
8
+ declare const loadConfig: () => any;
9
+ declare const pandacss: PluginCreator<PluginOptions>;
8
10
 
9
- export { pandacss as default, loadConfig, pandacss };
11
+ export { type PluginOptions, pandacss as default, loadConfig, pandacss };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { PluginCreator } from 'postcss';
2
2
 
3
- declare const loadConfig: () => any;
4
- declare const pandacss: PluginCreator<{
3
+ interface PluginOptions {
5
4
  configPath?: string;
6
5
  cwd?: string;
7
- }>;
6
+ logfile?: string;
7
+ }
8
+ declare const loadConfig: () => any;
9
+ declare const pandacss: PluginCreator<PluginOptions>;
8
10
 
9
- export { pandacss as default, loadConfig, pandacss };
11
+ export { type PluginOptions, pandacss as default, loadConfig, pandacss };
package/dist/index.js CHANGED
@@ -42,21 +42,13 @@ var customRequire = (0, import_module.createRequire)(__dirname);
42
42
  var PLUGIN_NAME = "pandacss";
43
43
  var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
44
44
  var loadConfig = () => interopDefault(customRequire("@pandacss/postcss"));
45
+ var stream;
45
46
  var builder = new import_node.Builder();
46
- var nodeModulesRegex = /node_modules/;
47
- function isValidCss(file) {
48
- const [filePath] = file.split("?");
49
- return import_path.default.extname(filePath) === ".css";
50
- }
51
- var shouldSkip = (fileName) => {
52
- if (!fileName)
53
- return true;
54
- if (!isValidCss(fileName))
55
- return true;
56
- return nodeModulesRegex.test(fileName);
57
- };
58
47
  var pandacss = (options = {}) => {
59
- const { configPath, cwd } = options;
48
+ const { configPath, cwd, logfile } = options;
49
+ if (!stream && logfile) {
50
+ stream = (0, import_node.setLogStream)({ cwd, logfile });
51
+ }
60
52
  return {
61
53
  postcssPlugin: PLUGIN_NAME,
62
54
  plugins: [
@@ -89,6 +81,18 @@ var pandacss = (options = {}) => {
89
81
  };
90
82
  pandacss.postcss = true;
91
83
  var src_default = pandacss;
84
+ var nodeModulesRegex = /node_modules/;
85
+ function isValidCss(file) {
86
+ const [filePath] = file.split("?");
87
+ return import_path.default.extname(filePath) === ".css";
88
+ }
89
+ var shouldSkip = (fileName) => {
90
+ if (!fileName)
91
+ return true;
92
+ if (!isValidCss(fileName))
93
+ return true;
94
+ return nodeModulesRegex.test(fileName);
95
+ };
92
96
  // Annotate the CommonJS export names for ESM import in node:
93
97
  0 && (module.exports = {
94
98
  loadConfig,
package/dist/index.mjs CHANGED
@@ -6,28 +6,20 @@ var getDirname = () => path.dirname(getFilename());
6
6
  var __dirname = /* @__PURE__ */ getDirname();
7
7
 
8
8
  // src/index.ts
9
- import { Builder } from "@pandacss/node";
9
+ import { Builder, setLogStream } from "@pandacss/node";
10
10
  import { createRequire } from "module";
11
11
  import path2 from "path";
12
12
  var customRequire = createRequire(__dirname);
13
13
  var PLUGIN_NAME = "pandacss";
14
14
  var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
15
15
  var loadConfig = () => interopDefault(customRequire("@pandacss/postcss"));
16
+ var stream;
16
17
  var builder = new Builder();
17
- var nodeModulesRegex = /node_modules/;
18
- function isValidCss(file) {
19
- const [filePath] = file.split("?");
20
- return path2.extname(filePath) === ".css";
21
- }
22
- var shouldSkip = (fileName) => {
23
- if (!fileName)
24
- return true;
25
- if (!isValidCss(fileName))
26
- return true;
27
- return nodeModulesRegex.test(fileName);
28
- };
29
18
  var pandacss = (options = {}) => {
30
- const { configPath, cwd } = options;
19
+ const { configPath, cwd, logfile } = options;
20
+ if (!stream && logfile) {
21
+ stream = setLogStream({ cwd, logfile });
22
+ }
31
23
  return {
32
24
  postcssPlugin: PLUGIN_NAME,
33
25
  plugins: [
@@ -60,6 +52,18 @@ var pandacss = (options = {}) => {
60
52
  };
61
53
  pandacss.postcss = true;
62
54
  var src_default = pandacss;
55
+ var nodeModulesRegex = /node_modules/;
56
+ function isValidCss(file) {
57
+ const [filePath] = file.split("?");
58
+ return path2.extname(filePath) === ".css";
59
+ }
60
+ var shouldSkip = (fileName) => {
61
+ if (!fileName)
62
+ return true;
63
+ if (!isValidCss(fileName))
64
+ return true;
65
+ return nodeModulesRegex.test(fileName);
66
+ };
63
67
  export {
64
68
  src_default as default,
65
69
  loadConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/postcss",
3
- "version": "0.29.1",
3
+ "version": "0.30.0",
4
4
  "description": "PostCSS integration for Panda CSS",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,7 +33,10 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "postcss": "^8.4.31",
36
- "@pandacss/node": "0.29.1"
36
+ "@pandacss/node": "0.30.0"
37
+ },
38
+ "devDependencies": {
39
+ "@pandacss/logger": "0.30.0"
37
40
  },
38
41
  "scripts": {
39
42
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",