Skip to content

Commit 78a7576

Browse files
authored
refactor: tweak scripts and fix playground (#1592)
1 parent abe3531 commit 78a7576

File tree

24 files changed

+458
-466
lines changed

24 files changed

+458
-466
lines changed

package.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"scripts": {
77
"playground": "pnpm --filter=./playground",
88
"build:playground": "pnpm --filter {./playground}... build",
9-
"build:shared": "pnpm --filter {./packages/shared}... build-fast",
109
"prepare": "husky install && pnpm build-fast",
11-
"dev:extensions": "pnpm -r --parallel --filter=./extension/** dev",
12-
"dev": "pnpm --parallel --filter=./packages/shared --filter=./packages/is-valid-prop --filter=./packages/postcss dev",
10+
"dev": "pnpm --parallel --filter=./packages/** dev",
1311
"build-fast": "pnpm -r --parallel --filter=./packages/** build-fast",
1412
"build": "pnpm -r --filter=./packages/** build",
1513
"check": "pnpm build && pnpm typecheck && pnpm lint && pnpm test run",
@@ -25,15 +23,12 @@
2523
"typecheck": "tsc --noEmit",
2624
"release": "changeset publish",
2725
"release-dev": "changeset version --snapshot dev && changeset publish --tag dev",
28-
"prepare-studio": "PANDA_CLI=compiled pnpm --filter=./packages/studio codegen",
29-
"build-studio": "PANDA_CLI=compiled pnpm --filter=./sandbox/vite-ts exec pnpm panda studio --build",
30-
"deploy-studio": "PANDA_CLI=compiled pnpm prepare-studio && pnpm build-studio",
26+
"prepare-studio": "pnpm --filter=./packages/studio codegen",
27+
"build-studio": "pnpm --filter=./sandbox/vite-ts exec pnpm panda studio --build",
28+
"deploy-studio": "pnpm prepare-studio && pnpm build-studio",
3129
"serve-studio": "npx serve ./sandbox/vite-ts/panda-static",
3230
"website": "pnpm --filter=./website",
33-
"mdx-check": "mdx-local-link-checker docs && mdx-local-link-checker website/pages/docs",
34-
"extension:build": "pnpm --filter=./extension/vscode build",
35-
"extension:release": "pnpm --filter=./extension/vscode release",
36-
"extension:prerelease": "pnpm --filter=./extension/vscode prerelease"
31+
"mdx-check": "mdx-local-link-checker docs && mdx-local-link-checker website/pages/docs"
3732
},
3833
"keywords": [],
3934
"author": "Segun Adebayo <[email protected]>",
@@ -44,10 +39,14 @@
4439
"@types/node": "20.4.5",
4540
"@typescript-eslint/eslint-plugin": "6.2.1",
4641
"@typescript-eslint/parser": "6.2.1",
42+
"chokidar": "^3.5.3",
4743
"concurrently": "^8.2.0",
44+
"happy-dom": "^12.1.6",
4845
"husky": "8.0.3",
46+
"mdx-local-link-checker": "^2.1.1",
4947
"lint-staged": "13.2.3",
5048
"prettier": "^2.8.8",
49+
"rimraf": "^5.0.1",
5150
"ts-morph": "19.0.0",
5251
"tsup": "7.1.0",
5352
"tsx": "3.12.10",
@@ -63,10 +62,9 @@
6362
]
6463
},
6564
"packageManager": "[email protected]",
66-
"devDependencies": {
67-
"chokidar": "^3.5.3",
68-
"happy-dom": "^12.1.6",
69-
"mdx-local-link-checker": "^2.1.1",
70-
"rimraf": "^5.0.1"
65+
"pnpm": {
66+
"overrides": {
67+
"@swc/helpers@~0.4": "0.4.36"
68+
}
7169
}
7270
}

packages/cli/bin.js

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
11
#!/usr/bin/env node
22

3-
// check if we're running in dev mode
4-
const fs = require('fs')
5-
const path = require('path')
6-
const srcPath = path.resolve(path.join(__dirname, './src'))
7-
const isDevMode = fs.existsSync(srcPath)
8-
// or want to "force" running the compiled version with PANDA_CLI_MODE=compiled
9-
const wantsCompiled = process.env.PANDA_CLI === 'compiled'
10-
11-
if (wantsCompiled || !isDevMode) {
12-
// this runs from the compiled javascript source
13-
require(`./dist/cli-default.js`)
14-
} else {
15-
const workspacePackagesDir = path.resolve(__dirname, '..')
16-
const symlink = require('@pandacss/symlink')
17-
18-
const unregister = symlink({
19-
workspacePackagesDir,
20-
requireSource: () => {
21-
const mod = require('./src/cli-main')
22-
mod.main(true)
23-
},
24-
})
25-
26-
unregister()
27-
}
3+
require(`./dist/cli-default.js`)

packages/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"@pandacss/preset-panda": "workspace:*",
6666
"@pandacss/shared": "workspace:*",
6767
"@pandacss/studio": "workspace:*",
68-
"@pandacss/symlink": "workspace:*",
6968
"@pandacss/token-dictionary": "workspace:*",
7069
"@pandacss/types": "workspace:*",
7170
"cac": "6.7.14",

packages/generator/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
},
2525
"scripts": {
2626
"build": "tsup src/index.ts --format=esm,cjs --dts",
27-
"build-fast": "tsup src/index.ts --format=esm,cjs --no-dts"
27+
"build-fast": "tsup src/index.ts --format=esm,cjs --no-dts",
28+
"dev": "pnpm build-fast --watch"
2829
},
2930
"files": [
3031
"dist"

packages/parser/__tests__/output.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,10 +792,13 @@ describe('extract to css output pipeline', () => {
792792
.\\\\[\\\\@media_\\\\(min-width\\\\:_768px\\\\)\\\\]\\\\:\\\\[\\\\&\\\\:disabled\\\\]\\\\:filter_brightness\\\\(1\\\\):disabled {
793793
filter: brightness(1)
794794
}
795+
}
796+
797+
@media (min-width: 768px) {
795798
.\\\\[\\\\@media_\\\\(min-width\\\\:_768px\\\\)\\\\]\\\\:p_1rem_0 {
796799
padding: 1rem 0
797800
}
798-
}
801+
}
799802
}"
800803
`)
801804
})
@@ -1960,7 +1963,11 @@ describe('extract to css output pipeline', () => {
19601963
margin-block-start: 1em
19611964
}
19621965
1963-
.\\\\[\\\\&_h1\\\\]\\\\:\\\\[\\\\&\\\\:not\\\\(\\\\:first-child\\\\)\\\\]\\\\:mb_1em h1:not(:first-child),.\\\\[\\\\&_h2\\\\]\\\\:\\\\[\\\\&\\\\:not\\\\(\\\\:first-child\\\\)\\\\]\\\\:mb_1em h2:not(:first-child) {
1966+
.\\\\[\\\\&_h1\\\\]\\\\:\\\\[\\\\&\\\\:not\\\\(\\\\:first-child\\\\)\\\\]\\\\:mb_1em h1:not(:first-child) {
1967+
margin-block-end: 1em
1968+
}
1969+
1970+
.\\\\[\\\\&_h2\\\\]\\\\:\\\\[\\\\&\\\\:not\\\\(\\\\:first-child\\\\)\\\\]\\\\:mb_1em h2:not(:first-child) {
19641971
margin-block-end: 1em
19651972
}
19661973
}"

packages/postcss/entry.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/postcss/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
"name": "@pandacss/postcss",
33
"version": "0.17.4",
44
"description": "PostCSS integration for Panda CSS",
5-
"main": "entry.js",
5+
"main": "dist/index.js",
6+
"module": "dist/index.mjs",
67
"types": "dist/index.d.ts",
78
"author": "Segun Adebayo <[email protected]>",
89
"exports": {
910
".": {
1011
"source": "./src/index.ts",
1112
"types": "./dist/index.d.ts",
12-
"require": "./entry.js",
13+
"require": "./dist/index.js",
1314
"import": {
1415
"types": "./dist/index.d.mts",
15-
"default": "./entry.js"
16+
"default": "./dist/index.mjs"
1617
}
1718
},
1819
"./package.json": "./package.json"
@@ -27,12 +28,10 @@
2728
"access": "public"
2829
},
2930
"files": [
30-
"dist",
31-
"entry.js"
31+
"dist"
3232
],
3333
"dependencies": {
3434
"@pandacss/node": "workspace:*",
35-
"@pandacss/symlink": "workspace:*",
3635
"postcss": "^8.4.31"
3736
}
3837
}

packages/symlink/CHANGELOG.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/symlink/package.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/symlink/src/index.js

Lines changed: 0 additions & 91 deletions
This file was deleted.

playground/next.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ const nextConfig = {
1616
return config
1717
},
1818
reactStrictMode: true,
19-
experimental: {
20-
appDir: true,
21-
outputFileTracingExcludes: {
22-
'*': ['**@swc**'],
23-
},
24-
},
2519
}
2620

2721
module.exports = nextConfig

playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"monaco-editor": "0.40.0",
3434
"monaco-jsx-highlighter": "^2.0.4",
3535
"nanoid": "4.0.2",
36-
"next": "13.5.6",
36+
"next": "14.0.0",
3737
"next-themes": "^0.2.1",
3838
"os-browserify": "0.3.0",
3939
"outdent": " ^0.8.0",
@@ -60,4 +60,4 @@
6060
"eslint": "8.46.0",
6161
"eslint-config-next": "13.4.12"
6262
}
63-
}
63+
}

playground/seo.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ const defineMetadata = <T extends Metadata>(metadata: T) => metadata
55
const seoConfig = defineMetadata({
66
title: {
77
template: '%s - Panda Playground',
8-
default:
9-
'Panda Playground - Explore and experiment with Panda CSS, the build time and type-safe CSS-in-JS styling engine',
8+
default: 'Panda Playground',
109
},
11-
description:
12-
'Explore and experiment with Panda CSS, the build time and type-safe CSS-in-JS styling engine with our interactive playground. Discover the power of Panda CSS in this user-friendly visual environment for hassle-free prototyping and rapid development.',
10+
description: 'Explore Panda CSS with an interactive playground. Create and share your own Panda CSS snippets.',
1311
themeColor: '#F6E458',
1412
openGraph: {
1513
images: '/og-image.png',

0 commit comments

Comments
 (0)