jantimon / next-yak

a streamlined CSS-in-JS solution tailor-made for Next.js, seamlessly combining the expressive power of styled-components syntax with efficient build-time extraction and minimal runtime footprint, ensuring optimal performance and easy integration with existing atomic CSS frameworks like Tailwind CSS
https://yak.js.org
108 stars 2 forks source link

run example jest & vitest in next-yak CI #124

Closed jantimon closed 1 month ago

jantimon commented 1 month ago

fixes #56

this is how yak works if no compiler is used:

styled.button`color:red`; is syntactic sugar for styled.button(["color:red"])

shot-A9n8uWdO@2x

shot-NGeTQsyG@2x

therefore styled.button`color:red`; will render <button className="">

right now there is a bug when using constants:

const color = "blue";
const Button = styled.button`color:${blue};`;

as this is is syntactic sugar for styled.button(["color:", ";"], "blue") which will render <button className="blue">

but I believe this PR is still okay for a first round and we should try to fix the issue above in a follow up e.g. with an early return in styled if the first arg is an array

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-yak-benchmark ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2024 6:18pm
yacijs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2024 6:18pm
codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #124 will not alter performance

Comparing feature/jest-tests (d92f60b) with main (8eea888)

Summary

✅ 2 untouched benchmarks