# grunt-riot

> riot custom tag compile grunt plugin.

Latest version **0.1.8** (published 2016-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-riot
pnpm add grunt-riot
yarn add grunt-riot
bun add grunt-riot
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2016-12-17 |
| First published | 2015-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | ariesjia |
| Maintainers | ariesjia |
| Keywords | riot custom tag compile grunt plugin |

## Links

- npm: https://www.npmjs.com/package/grunt-riot
- Repository: https://github.com/ariesjia/grunt-riot
- Homepage: https://github.com/ariesjia/grunt-riot#readme
- Issues: https://github.com/ariesjia/grunt-riot/issues
- npm.io page: https://npm.io/package/grunt-riot

## Dependencies (3)

- [riot](https://npm.io/package/riot.md) ^3.0.4
- [modularize](https://npm.io/package/modularize.md) ^0.1.7
- [concat-stream](https://npm.io/package/concat-stream.md) ^1.4.7

## Recent versions

- 0.1.8 (latest) — 2016-12-17
- 0.1.6 — 2016-01-30
- 0.1.5 — 2016-01-30
- 0.1.4 — 2015-11-09
- 0.1.3 — 2015-05-25
- 0.1.2 — 2015-05-21
- 0.1.1 — 2015-05-21
- 0.1.0 — 2015-05-21
- 0.0.18 — 2015-05-20
- 0.0.17 — 2015-04-28
- 0.0.16 — 2015-04-17
- 0.0.15 — 2015-04-16
- 0.0.13 — 2015-03-19
- 0.0.12 — 2015-03-19
- 0.0.11 — 2015-03-12
- … 9 more at https://npm.io/package/grunt-riot/versions

## README

# grunt-riot

> grunt plugin for riot

[![Build Status](https://travis-ci.org/ariesjia/grunt-riot.svg?branch=master)](https://travis-ci.org/ariesjia/grunt-riot)

This plugin compile [riot](https://github.com/muut/riotjs)'s `.tag` files.

## Getting Started
This plugin requires Grunt.

```shell
npm install grunt-riot --save-dev
```

Once that's done, add this line to your project's Gruntfile Or use [load-grunt-tasks](https://github.com/sindresorhus/load-grunt-tasks) 

```js
grunt.loadNpmTasks('grunt-riot');
```


### Usage Examples

```js
grunt.initConfig({
  riot: {
    options:{
        template : 'jade',
        type : 'coffeescript'
    },
    dist: {
        expand: true,
        cwd: '<%= app %>/scripts',
        src: '**/*.tag',
        dest: '<%= app %>/scripts',
        ext: '.js'
    }
  },
})
```

if you want concat to a single file  , take care not to set `expand: true` ，eg:

```js
grunt.initConfig({
  riot: {
    options: {
        concat : true
    },
    src: 'script/*.tag',
    dest: '.tmp/tag.js'
  },
})
```

if you want concat to a single file with AMD and CommonJS support including dependencies , eg:

```js
grunt.initConfig({
  riot: {
    options: {
      concat : true,
      modular: {
        type: 'umd',
        deps: [
          'riot',
          {'jquery': '$'},
          {'lib/my_module': 'MyModule'}
        ]
      }
    },
    src: 'script/*.tag',
    dest: '.tmp/tag.js'
  },
})
```


### Options
* compact: `Boolean`
	* no whitespace between tags . eg : '<a></a> <span></span>' to '<a></a><span></span>'
	* default : `true`
* expr: `Boolean`
	* expressions trough parser
	* default : `true`
* type: `String`
	* javaScript parser type
	* default : `null`
* template: `String`
	* template parser
	* default : `null`
* parser: `Function`
	* custom javascript parser method
	* default : `null`
* fileConfig: `Function`
	* you can set single file compile option in callback 
	* default : `null`
* concat: `Boolean`
	* you can concat multiple tag file to a single file 
	* default : `false`
* modular: `Boolean` or modularization options:
  * type: `amd` or `common` or `umd`
  	* modularization type
  	* default : `umd`
  * deps: `Array`
  	* modularization dependencies
  	* default : `['riot']`
	* default : `false`

if you want use typescript , coffee or es , you should install compile module

* typescript :  typescript-simple
* coffeescript :  coffee-script
* es6 :  Babel
* jade :  jade

See more: [https://muut.com/riotjs/compiler.html](https://muut.com/riotjs/compiler.html)


## Release History
2015-01-26  0.0.1

## License
Copyright (c) 2015 . Licensed under the MIT license.

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