Skip to content

Commit

Permalink
feat: new boilerplate panda-css
Browse files Browse the repository at this point in the history
  • Loading branch information
phonzammi committed Nov 11, 2024
1 parent 1903098 commit 0a96567
Show file tree
Hide file tree
Showing 11 changed files with 1,227 additions and 324 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,7 @@ dist

# Generated GitHub Worflow action
.github/actions/bati-gen

## Panda
styled-system
styled-system-studio
13 changes: 13 additions & 0 deletions boilerplates/panda-css/files/$package.json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { loadPackageJson, type TransformerProps } from "@batijs/core";

export default async function getPackageJson(props: TransformerProps) {
const packageJson = await loadPackageJson(props, await import("../package.json").then((x) => x.default));

return packageJson
.setScript("prepare", {
value: "panda codegen",
precedence: 20,
})
.addDevDependencies(["@pandacss/dev", "postcss"])
.addDependencies([]);
}
1 change: 1 addition & 0 deletions boilerplates/panda-css/files/layouts/panda.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@layer reset, base, tokens, recipes, utilities;
25 changes: 25 additions & 0 deletions boilerplates/panda-css/files/panda.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from "@pandacss/dev";

export default defineConfig({
// Whether to use css reset
preflight: true,

// Where to look for your css declarations
include: [
"./components/**/*.{js,jsx,ts,tsx}",
"./layouts/**/*.{js,jsx,ts,tsx}",
"./pages/**/*.{js,jsx,ts,tsx}",
"./src/**/*.{js,jsx,ts,tsx}",
],

// Files to exclude
exclude: [],

// Useful for theme customization
theme: {
extend: {},
},

// The output directory for your css system
outdir: "styled-system",
});
5 changes: 5 additions & 0 deletions boilerplates/panda-css/files/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
plugins: {
"@pandacss/dev/postcss": {},
},
};
49 changes: 49 additions & 0 deletions boilerplates/panda-css/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@batijs/panda-css",
"private": true,
"version": "0.0.1",
"description": "",
"type": "module",
"scripts": {
"check-types": "tsc --noEmit",
"build": "bati-compile-boilerplate"
},
"keywords": [],
"author": "",
"license": "MIT",
"devDependencies": {
"@batijs/compile": "workspace:*",
"@pandacss/dev": "^0.47.1",
"@types/node": "^18.19.64",
"postcss": "^8.4.47"
},
"dependencies": {
"@batijs/core": "workspace:*"
},
"files": [
"dist/"
],
"bati": {
"if": {
"flag": "panda-css"
}
},
"exports": {
"./panda.config": {
"types": "./dist/types/panda.config.d.ts"
},
"./postcss.config": {
"types": "./dist/types/postcss.config.d.ts"
}
},
"typesVersions": {
"*": {
"panda.config": [
"./dist/types/panda.config.d.ts"
],
"postcss.config": [
"./dist/types/postcss.config.d.ts"
]
}
}
}
3 changes: 3 additions & 0 deletions boilerplates/panda-css/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["../tsconfig.base.json"]
}
4 changes: 4 additions & 0 deletions boilerplates/shared/files/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,7 @@ dist
# aws-cdk
.cdk.staging
cdk.out

## Panda
styled-system
styled-system-studio
1 change: 1 addition & 0 deletions packages/cli/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@batijs/hono#build",
"@batijs/lucia-auth#build",
"@batijs/mantine#build",
"@batijs/panda-css#build",
"@batijs/prettier#build",
"@batijs/prisma#build",
"@batijs/react#build",
Expand Down
16 changes: 16 additions & 0 deletions packages/features/src/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,22 @@ export const features = [
},
],
},
{
category: "CSS",
label: "PandaCSS",
flag: "panda-css",
image:
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHNoYXBlLXJlbmRlcmluZz0nZ2VvbWV0cmljUHJlY2lzaW9uJyB0ZXh0LXJlbmRlcmluZz0nZ2VvbWV0cmljUHJlY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1LjE1LTkyLjMxLTEuMy0xNC4yMy0xLjExLTI4LjM3IDIuODMtNDIuMjQgNC41Mi0xNS44NSAxNC4yLTI3LjA0IDMwLjI1LTMxLjcxIDE0Ljc1LTQuMyAyOS43LTQuMjcgNDQuMzUuNDcgMTMuMDkgNC4yMyAyMS42MyAxMy4xNyAyNS4yNiAyNi41NiAyLjc4IDEwLjI3IDIuNzggMjAuNjYuNjcgMzEuMDItMS42MiA3Ljk4LTQuODkgMTUuMjYtMTAuNzcgMjEuMDktMTAuNTYgMTAuNDUtMjMuNzQgMTIuODUtMzcuODggMTIuMDUtMi41Mi0uMTQtNS4wMy0uNDItNy42MS0uNzEtMS4yMS0uMTMtMi40NC0uMjYtMy42OS0uMzkuMDQuNDEuMDUuNzcuMDggMS4xMi4wMy42OC4wNiAxLjI2LjIgMS44My42IDIuNDIgMS4xOCA0Ljg1IDEuNzUgNy4yOCAxLjM5IDUuODYgMi43NyAxMS43MiA0LjU1IDE3LjQ1IDMuNDkgMTEuMjcgNy41NSAyMi4yNSAxMi4xNiAzMi45OCAzMi44Mi0yLjU2IDYzLjA2LTEwLjcyIDk1LjE1LTI5Ljk4LjQ4LS4zLjkyLS41OCAxLjM2LS44NSAxMy43OS04LjU5IDI0Ljk0LTE5LjcyIDMyLjY0LTM0LjA5IDEyLjQ2LTIzLjI4IDE0Ljg5LTQ4LjE3IDExLjE4LTczLjg3LTMuODItMjYuNTItMTUuNzItNDguNzgtMzYuMi02Ni4yNC0xNC4yMS0xMi4xMS0zMC42NC0yMC4wNC00OC40Ny0yNS4xNnonLz48L2c+PC9zdmc+",
url: "https://panda-css.com/",
tagline: "Write type-safe styles with ease using panda",
repo: "chakra-ui/panda",
links: [
{
label: "Docs",
href: "https://panda-css.com/docs/overview/getting-started",
},
],
},

// UI Component Libraries

Expand Down
Loading

0 comments on commit 0a96567

Please sign in to comment.