https://github.com/dirk/xstache
Isomorphic templates for the web
https://github.com/dirk/xstache
Last synced: 11 months ago
JSON representation
Isomorphic templates for the web
- Host: GitHub
- URL: https://github.com/dirk/xstache
- Owner: dirk
- License: bsd-2-clause
- Created: 2025-01-20T18:40:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-21T19:11:09.000Z (over 1 year ago)
- Last Synced: 2025-07-10T13:48:10.029Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 92.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xstache
Isomorphic templating for the web. Xstache fuses concepts from JSX and Mustache to create a templating language that can render to both an HTML string and/or to a virtual DOM.
```xml
{#icon}
{icon}
{/icon}
{children}
```
### Supported Languages
- [x] JavaScript
- [ ] Compile to a module or function that renders an HTML string
- [x] Compile to a component that renders JSX
- [ ] PHP (coming soon)
- [ ] Ruby (coming soon)
## Usage
### JSX
Install the package to transform Xstache to JSX JavaScript:
```sh
npm install @xstache/jsx
```
Execute the CLI to compile your Xstache template(s) to JavaScript files:
```sh
npx xstache-jsx --write example.xstache
```
## License
Released under the [2-clause BSD license](LICENSE).