# rioct-cli

> Converts HTML templates to React

Latest version **3.0.0** (published 2017-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install rioct-cli
pnpm add rioct-cli
yarn add rioct-cli
bun add rioct-cli
```

Provides the command `rioct`.

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2017-03-22 |
| First published | 2016-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Antonino Porcino |
| Maintainers | nippur72 |

## Links

- npm: https://www.npmjs.com/package/rioct-cli
- Repository: https://github.com/nippur72/rioct-cli
- Homepage: https://github.com/nippur72/rioct-cli#readme
- Issues: https://github.com/nippur72/rioct-cli/issues
- npm.io page: https://npm.io/package/rioct-cli

## Dependencies (13)

- [eval](https://npm.io/package/eval.md) ^0.1.1
- [glob](https://npm.io/package/glob.md) ^7.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [cheerio](https://npm.io/package/cheerio.md) ^0.22.0
- [esprima](https://npm.io/package/esprima.md) ^3.1.3
- [camelcase](https://npm.io/package/camelcase.md) ^4.0.0
- [escodegen](https://npm.io/package/escodegen.md) ^1.8.0
- [decamelize](https://npm.io/package/decamelize.md) ^1.1.2
- [optionator](https://npm.io/package/optionator.md) ^0.8.1
- [pascalcase](https://npm.io/package/pascalcase.md) ^0.1.1
- [blueimp-md5](https://npm.io/package/blueimp-md5.md) ^2.3.0
- [react-style-tag](https://npm.io/package/react-style-tag.md) ^1.1.0
- [react-templates](https://npm.io/package/react-templates.md) git+https://github.com/nippur72/react-templates.git#scope-syntax-parser

## Recent versions

- 3.0.0 (latest) — 2017-03-22
- 2.0.4 — 2017-03-22
- 2.0.3 — 2017-03-22
- 2.0.2 — 2017-02-11
- 2.0.1 — 2016-10-07
- 2.0.0 — 2016-09-05
- 1.1.0 — 2016-08-24
- 1.0.0 — 2016-08-23
- 0.12.0 — 2016-08-19
- 0.11.0 — 2016-08-18
- 0.10.0 — 2016-08-17
- 0.9.3 — 2016-08-16
- 0.9.2 — 2016-08-16
- 0.9.1 — 2016-08-16
- 0.9.0 — 2016-08-16
- … 30 more at https://npm.io/package/rioct-cli/versions

## README

# Rioct

Rioct is a HTML templating language for [React](https://facebook.github.io/react/),
built on top of [react-templates](https://github.com/wix/react-templates), of which it
extends the syntax and adds new features.

# Notable features

## Compared to [react-templates](https://github.com/wix/react-templates)

- easier syntax: `if`, `each` without the `rt-` prefix
- develop mode: a lot easier to debug with errors no longer "swallowed" by React. Expressions are checked for type integrity.
- accepts `.html` file extension (so to make HTML syntax highlight work in editors)
- can use `<kebab-case>` tag identifiers (turned into PascalCase)
- can make use of the `<style>` tag
- can use lower case names for events or attributes (e.g. `onclick` instead of `onClick`)
- automatically binds event handlers to `this`
- content yielding with `<yield />`, `<yield from=""/>` and `<yield to=""/>`
- `show` and `hide` attributes
- unified `class` attributes
- supports custom brackets like `{{ }}` or `{% %}`.

## Compared to [Riot](http://riotjs.com/)

- templates are compiled to pure JavaScript code, no runtime is required other than React
- early catching of errors with expressions syntax checked at compile time
- expressions are statically compiled, no bracket processing of any kind at runtime
- can extend native elements (`li`, `input`, etc..) with the `is` keyword
- has variable scoping `scope=`
- element is bound to `this` even in child nodes
- expressions need explicit `this`, no ambiguity between `window` and local
- no `parent.parent` hell
- no node inheritances in loops
- true `<virtual>` node (does not create an element)
- true `if` attribute (does not create child element when `false`)
- import dependencies with `<import>` tag
- builtin dynamic styles, can simulate scoped sytles with `_this_`
- byte-saving option that normalizes Html Whitespaces

# List of npm packages

- `rioct-cli` is the command line compiler tool that turns `.html` templates into actual React JavaScript code.
- [`rioct`](https://github.com/nippur72/rioct) is a TypeScript-friendly library to help consume compiled templates. The package is optional
and it's needed only for some advanced features. To use this package, TypeScript is not required (but recommended).
- [`rioct-loader`](https://github.com/nippur72/rioct-loader) is a webpack loader for Rioct templates, so that you can `require()` directly
template files from JavaScript.

# Topics

- [rioct-cli](RIOCT-CLI.md)
- rioct
- template language reference

---
_Source: https://npm.io/package/rioct-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
