@pandacss/postcss 0.17.0 → 0.17.1
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.js +3 -8
- package/dist/index.mjs +10 -2
- package/entry.js +27 -0
- package/package.json +23 -5
package/dist/index.js
CHANGED
|
@@ -25,18 +25,12 @@ __export(src_exports, {
|
|
|
25
25
|
pandacss: () => pandacss
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(src_exports);
|
|
28
|
-
|
|
29
|
-
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.31_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js
|
|
30
|
-
var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
31
|
-
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
32
|
-
|
|
33
|
-
// src/index.ts
|
|
34
28
|
var import_node = require("@pandacss/node");
|
|
35
29
|
var import_module = require("module");
|
|
36
|
-
var
|
|
30
|
+
var customRequire = (0, import_module.createRequire)(__dirname);
|
|
37
31
|
var PLUGIN_NAME = "pandacss";
|
|
38
32
|
var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
|
|
39
|
-
var loadConfig = () => interopDefault(
|
|
33
|
+
var loadConfig = () => interopDefault(customRequire("@pandacss/postcss"));
|
|
40
34
|
var pandacss = (options = {}) => {
|
|
41
35
|
const { configPath, cwd } = options;
|
|
42
36
|
const builder = new import_node.Builder();
|
|
@@ -48,6 +42,7 @@ var pandacss = (options = {}) => {
|
|
|
48
42
|
if (!builder.isValidRoot(root)) {
|
|
49
43
|
return;
|
|
50
44
|
}
|
|
45
|
+
builder.emit();
|
|
51
46
|
await builder.extract();
|
|
52
47
|
builder.registerDependency((dep) => {
|
|
53
48
|
result.messages.push({
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.31_typescript@5.2.2/node_modules/tsup/assets/esm_shims.js
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
import path from "path";
|
|
4
|
+
var getFilename = () => fileURLToPath(import.meta.url);
|
|
5
|
+
var getDirname = () => path.dirname(getFilename());
|
|
6
|
+
var __dirname = /* @__PURE__ */ getDirname();
|
|
7
|
+
|
|
1
8
|
// src/index.ts
|
|
2
9
|
import { Builder } from "@pandacss/node";
|
|
3
10
|
import { createRequire } from "module";
|
|
4
|
-
var
|
|
11
|
+
var customRequire = createRequire(__dirname);
|
|
5
12
|
var PLUGIN_NAME = "pandacss";
|
|
6
13
|
var interopDefault = (obj) => obj && obj.__esModule ? obj.default : obj;
|
|
7
|
-
var loadConfig = () => interopDefault(
|
|
14
|
+
var loadConfig = () => interopDefault(customRequire("@pandacss/postcss"));
|
|
8
15
|
var pandacss = (options = {}) => {
|
|
9
16
|
const { configPath, cwd } = options;
|
|
10
17
|
const builder = new Builder();
|
|
@@ -16,6 +23,7 @@ var pandacss = (options = {}) => {
|
|
|
16
23
|
if (!builder.isValidRoot(root)) {
|
|
17
24
|
return;
|
|
18
25
|
}
|
|
26
|
+
builder.emit();
|
|
19
27
|
await builder.extract();
|
|
20
28
|
builder.registerDependency((dep) => {
|
|
21
29
|
result.messages.push({
|
package/entry.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// check if we're running in dev mode
|
|
2
|
+
const fs = require('fs')
|
|
3
|
+
const isDevMode = fs.existsSync(`./src`)
|
|
4
|
+
// or want to "force" running the compiled version with PANDA_CLI_MODE=compiled
|
|
5
|
+
const wantsCompiled = process.env.PANDA_CLI === 'compiled'
|
|
6
|
+
|
|
7
|
+
let plugin = {}
|
|
8
|
+
|
|
9
|
+
if (wantsCompiled || !isDevMode) {
|
|
10
|
+
// this runs from the compiled javascript source
|
|
11
|
+
plugin = require(`./dist/index.js`)
|
|
12
|
+
} else {
|
|
13
|
+
const path = require('path')
|
|
14
|
+
const workspacePackagesDir = path.resolve(__dirname, '..')
|
|
15
|
+
const symlink = require('@pandacss/symlink')
|
|
16
|
+
|
|
17
|
+
const unregister = symlink({
|
|
18
|
+
workspacePackagesDir,
|
|
19
|
+
requireSource: () => {
|
|
20
|
+
plugin = require('./index')
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
unregister()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = plugin
|
package/package.json
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/postcss",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "PostCSS integration for Panda CSS",
|
|
5
|
-
"main": "
|
|
6
|
-
"module": "dist/index.mjs",
|
|
5
|
+
"main": "entry.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"require": "./entry.js",
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./entry.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
9
20
|
"sideEffects": false,
|
|
10
21
|
"publishConfig": {
|
|
11
22
|
"access": "public"
|
|
12
23
|
},
|
|
13
24
|
"files": [
|
|
14
|
-
"dist"
|
|
25
|
+
"dist",
|
|
26
|
+
"entry.js"
|
|
15
27
|
],
|
|
16
28
|
"dependencies": {
|
|
17
29
|
"postcss": "^8.4.31",
|
|
18
|
-
"@pandacss/node": "0.17.
|
|
30
|
+
"@pandacss/node": "0.17.1",
|
|
31
|
+
"@pandacss/symlink": "0.17.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"pirates": "^4.0.6",
|
|
35
|
+
"resolve.exports": "^2.0.2",
|
|
36
|
+
"sucrase": "^3.34.0"
|
|
19
37
|
},
|
|
20
38
|
"scripts": {
|
|
21
39
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|