Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.
/ box-extractor Public archive

Static code extraction. Zero-runtime CSS-in-TS `<Box />` -> became a part of Panda CSS

Notifications You must be signed in to change notification settings

astahmer/box-extractor

Repository files navigation

this repo was inlined in Panda CSS (here in this PR) and will therefore no longer be maintained, code now living in the current @pandacss/extractor package


Static code extraction. Zero-runtime CSS-in-TS <Box />

Optimize your code and elevate your developer experience with compile-time optimizations from static analysis.

💎   Enhanced DX close to Chakra-UI's <Box /> without the runtime cost

✂️   Smaller CSS/JS output (up to 99%) with compile-time purge just like Tailwind CSS

🎯   Over 180k props/values/conditions combinations, only 1 used in your app, only 1 will remain

🔍   Smart analyzer built-in for near instant drop-in benefits

💾   Low-level AST output with access to ts-morph Node objects for fine-grained control

Installation

core (static AST extraction)

if you need the static analysis (using ts-morph on components props/functions args:

pnpm add @box-extractor/core

or you could try it like this:

pnpx @box-extractor/cli -i path/to/input.ts -o path/to/report.json --functions="css,styled" --components="div,factory.*,SomeComponent"