Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamen/html-to-hyperapp
Convert HTML to Hyperapp JSON.
https://github.com/jamen/html-to-hyperapp
Last synced: 17 days ago
JSON representation
Convert HTML to Hyperapp JSON.
- Host: GitHub
- URL: https://github.com/jamen/html-to-hyperapp
- Owner: jamen
- License: mit
- Created: 2018-06-14T11:30:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T13:49:41.000Z (over 6 years ago)
- Last Synced: 2024-10-20T02:31:38.867Z (25 days ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# html-to-hyperapp
Convert HTML to Hyperapp JSON
## Install
```sh
npm i @jamen/html-to-hyperapp
```Or use the CLI utility:
```sh
npx @jamen/html-to-hyperapp input.html output.json
```## Usage
### `htmlToHyperapp(input, output)`
Takes an input stream and output stream, where HTML comes from the input and JSON is written to the output.
```js
htmlToHyperapp(
fs.createReadStream('./input.html'),
fs.createWriteStream('./output.json')
)
```### `html-to-hyperapp [input] [output]`
Performs the function over files or stdio.
```sh
$ html-to-hyperapp input.html output.json
$ cat input.html | html-to-hyperapp > output.json
```