Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yazaldefilimone/scc.rs
Rust-based Structured Content Compiler
https://github.com/yazaldefilimone/scc.rs
compiler html markdown react vuejs
Last synced: 27 days ago
JSON representation
Rust-based Structured Content Compiler
- Host: GitHub
- URL: https://github.com/yazaldefilimone/scc.rs
- Owner: yazaldefilimone
- License: mit
- Created: 2024-06-17T09:44:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-28T16:05:12.000Z (4 months ago)
- Last Synced: 2024-06-29T17:12:19.401Z (4 months ago)
- Topics: compiler, html, markdown, react, vuejs
- Language: Rust
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```ascii
| .............................. process ............................... |
| ....... parse .... | ..... run ...... | .... render .......... |+--------+ +----------+
Input ->- | Parser | ->- AST ->- | Compiler | ->- JSX/Vue/HTML...
+--------+ | +----------+
X
|
+--------------+
| Transformers |
+--------------+```
- How SCC works?
1. Markdown(with jsx/tsx)
```mdx
export function Thing() {
return <>World>;
}# Hello
```- Result
```jsx
/* @jsxRuntime automatic */
/* @jsxImportSource react */export function Thing() {
return <>World>;
}export default function MDXContent() {
return (
Hello
);
}
```2. Markdown(with vue)
```html
import {ref} from 'vue' const count = ref(0)
## Markdown Content
The count is: {{ count }}
Increment
```- Result
```vue
import { ref } from "vue";
const count = ref(0);
Markdown Content
The count is: {{ count }}
Increment```