Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ubermanu/jhj
🦒 A CLI that parses and serves JSX files
https://github.com/ubermanu/jhj
cli jsx nodejs parser render serve
Last synced: 18 days ago
JSON representation
🦒 A CLI that parses and serves JSX files
- Host: GitHub
- URL: https://github.com/ubermanu/jhj
- Owner: ubermanu
- License: mit
- Created: 2022-02-24T17:46:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T18:19:20.000Z (about 2 years ago)
- Last Synced: 2024-10-02T22:17:11.817Z (about 1 month ago)
- Topics: cli, jsx, nodejs, parser, render, serve
- Language: JavaScript
- Homepage: https://ubermanu.github.io/jhj/
- Size: 182 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JHJ
[![CI](https://github.com/ubermanu/jhj/actions/workflows/ci.yml/badge.svg)](https://github.com/ubermanu/jhj/actions/workflows/ci.yml)
A small utility to serve and render JSX content.
This is an experiment to test out my ESM knowledge.
Do not use this in production.## Install
npm install -g jhj
## Usage
Render JSX content:
jhj -r '
Hello World'Run the built-in server:
jhj -S localhost:3000
## Quick Start
To render a file, it must be ES compatible and return a default export.
Example:
```jsx
// hello-world.jsx
const world = 'World'
export defaultHello {world}
```> Dynamic imports are not supported for the moment
Then you can render this file using:
jhj -f ./hello-world.jsx