shiki
astroturf
shiki | astroturf | |
---|---|---|
26 | 4 | |
8,626 | 2,261 | |
4.3% | 0.1% | |
9.8 | 2.1 | |
15 days ago | 4 months ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
shiki
- Shiki: A beautiful yet powerful syntax highlighter
-
VueJS turns 10 years old
Shiki (https://shiki.style) might be good enough for your usecase, use the latest beta versions as it's the new fresh esm rewrite.
-
GIGO and VS-code: the Battle With Microsoft
Finally the vanguard had arrived. A markdown renderer named Shiki.
-
Scraping Google Maps
Can I introduce you to our lord and savior Shiki? https://github.com/shikijs/shiki
-
Shiki Syntax Highlighter
Coincidentally, I recently looked into the slow startup time for shiki and it was mostly from parsing JSONC, not WASM: https://github.com/shikijs/shiki/issues/439.
-
Dark mode with Shiki and Code Hike
Warning: This article refers to versions of Code Hike before 0.8.0. Since version 0.8.0, Code Hike uses lighter instead of Shiki. The approach presented in this article uses shiki's color replacement method, which no longer works with lighter.
- What do you use to display code example on your personal blog, or in an article?
-
Nextra 2 – Next.js Static Site Generator
Prismjs was replaced by Shiki and rehype-pretty-code.
-
Want to create attractive, interactive docs? Use these amazing documentation tools and examples
The outcome I was (mostly) hoping for has been done by Shiki library! I take no credit for the idea btw, I am just glad that someone else (Pine) took it on!
astroturf
-
VueJS turns 10 years old
CSS-in-JS has been a challenge – we're currently using https://github.com/astroturfcss/astroturf which seemed the simplest zero-runtime-cost option back when we were looking, but the library is starting to feel a bit under-maintained (if the author of Astroturf reads this, we love your work and will do whatever we can to support you in it!). But it's worked well for us over the last 2 years.
Happy to share a component example. We also use a small library for managing CSS classes in a typed fashion, which can also be used by our UI test code to target various elements. So that does add a bit of cryptic boilerplate, but the repo README has an example component with syntax highlighting:
-
SFC - single file components
Try https://github.com/4Catalyzer/astroturf
-
PurgeCSS & styled-components: Does It Work?
On the other side of our titular question is styled-components. While I'm talking about styled-components specifically, the topics and concepts here apply to any CSS-in-JS provider (e.g. emotion). There is a smaller CSS-in-JS library called astroturf that aims to give the developer the best of all worlds, so the limitations I'll discuss later on don't apply there. But be careful with smaller projects/ones that claim you can have it all! You are wading through uncharted territory :)
- Is it possible to directly write SCSS inside React components?
What are some alternatives?
PrismJS - Lightweight, robust, elegant syntax highlighting.
PostCSS - Transforming styles with JS plugins
Highlight.js - JavaScript syntax highlighter with language auto-detection and zero dependencies.
styled-components - Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
next-mdx-remote - Load mdx content from anywhere through getStaticProps in next.js
purifycss - Remove unused CSS. Also works with single-page apps.
codehike - Marvellous code walkthroughs
babel-sublime - Syntax definitions for ES6 JavaScript with React JSX extensions.
mdx - Markdown for the component era
purgecss - Remove unused CSS
dev - Development repository for the CodeMirror editor project
Sass - Sass makes CSS fun!