https://github.com/queckezz/hscript
Cli for converting html to hyperscript and the other way around.
https://github.com/queckezz/hscript
Last synced: 5 months ago
JSON representation
Cli for converting html to hyperscript and the other way around.
- Host: GitHub
- URL: https://github.com/queckezz/hscript
- Owner: queckezz
- License: mit
- Created: 2015-02-21T15:04:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-21T16:09:21.000Z (over 10 years ago)
- Last Synced: 2024-11-06T07:43:34.004Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# hscript
[![Build Status][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]Cli for converting html to hyperscript and the other way around.
## Installation
```sh
$ npm install -g hscript
```## Usage
```sh
$ hscript index.html
# -> h('div', ['text'])
``````sh
$ hscript index.js
# ->text
```### Read from `stdin`
```sh
$ echo "text" | hscript
# -> h('div', ['text'])
``````sh
$ echo "h('div', ['text'])" | hscript --html
# ->text
```## Run tests
```
npm test
```## License
[MIT][license-url]
[npm-image]: https://img.shields.io/npm/v/hscript.svg?style=flat-square
[npm-url]: https://npmjs.org/package/hscript[david-image]: http://img.shields.io/david/queckezz/hscript.svg?style=flat-square
[david-url]: https://david-dm.org/queckezz/hscript[license-image]: http://img.shields.io/npm/l/hscript.svg?style=flat-square
[license-url]: ./license[travis-image]: https://img.shields.io/travis/queckezz/hscript.svg?style=flat-square
[travis-url]: https://travis-ci.org/queckezz/hscript