Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/e-jigsaw/roister

:beer: using riot by jade and coffeescript
https://github.com/e-jigsaw/roister

Last synced: 26 days ago
JSON representation

:beer: using riot by jade and coffeescript

Awesome Lists containing this project

README

        

# DEPRECATED

Riot can pre-process jade and coffee-script. Use original riot-compiler.

roister [![npm version](https://badge.fury.io/js/roister.svg)](http://badge.fury.io/js/roister) [![dependency Status](https://david-dm.org/e-jigsaw/roister/status.svg)](https://david-dm.org/e-jigsaw/roister) [![devDependency Status](https://david-dm.org/e-jigsaw/roister/dev-status.svg)](https://david-dm.org/e-jigsaw/roister#info=devDependencies)
=======

:beer: using [riot](https://github.com/muut/riotjs) by jade and coffeescript

# Usage

riot:

```jsx


{ opts.title }


  • { item }



Add { items.length + 1 }

// logic
this.items = []

add(e) {
var input = e.target[0]
this.items.push(input.value)
input.value = ''
}

```

roister:

```jade
todo
h3 { opts.title }

ul
li(each='{ item, i in items}') { item }

form(onsubmit='{ add }')
input
button Add { items.length + 1 }

script.
@items = []

@add = (e)=>
input = e.target[0]
@items.push input.value
input.value = ''
```

Roister write with [jade](http://jade-lang.com/) and [CoffeeScript](http://coffeescript.org/).

# Installation

## Global install

```sh
% npm install roister -g
```

## Local install

```sh
% npm install roister -S
```

# API

## CLI

```sh
% roister --help

Usage: roister [options]

Options:

-h, --help output usage information
-V, --version output the version number
-c, --compile compile file
-p, --print print code
-o, --output output file
```

```sh
% roister -c hoge.jade
% cat hoge.js
...
```

## Module

```coffee
{compile} = require 'roister'

result = compile '''
hoge
p fuga
script.
# something
'''
```

# Requirements

* Node.js

# Build

```sh
% npm run build
```

# Test

```sh
% npm test
```

# Author

* jigsaw (http://jgs.me, [@e-jigsaw](http://github.com/e-jigsaw))

# License

MIT

The MIT License (MIT)

Copyright (c) 2015 Takaya Kobayashi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.