gulp-riotts
v0.0.1
Published
A gulp plugin for RiotTS
Maintainers
Readme
A gulp plugin for RiotTS
Usage
This plugin allows to precompile riot tags that are compatible with RiotTS.
Example
var gulp = require('gulp');
var riotts = require('gulp-riotts');
gulp.task('some-task', function() {
return gulp.src('*.html')
.pipe(riotts())
.pipe(gulp.dest('tags.js'));
});Compile options
This plugin supports riot's compile options.
g.pipe(riotts({ compact: true }));Available options
- indexByTagName:
Boolean- If set to
truewill index compiled tags by tag name rather than file path.
- If set to
- rootDir:
String- Allows to override the root directory of file names if
indexByTagNameis nottrue
- Allows to override the root directory of file names if
- compact:
Boolean- Minify
</p> <p>to</p><p>
- Minify
- whitespace:
Boolean- Escape
\nto\\n
- Escape
- expr:
Boolean- Run expressions through parser defined with
--type
- Run expressions through parser defined with
- type:
String, coffeescript | typescript | cs | es6 | livescript | none- JavaScript parser
- template:
String, jade- Template parser
- See more: https://muut.com/riotjs/compiler.html
- modular:
Boolean- For AMD and CommonJS option
- See more: http://riotjs.com/guide/compiler/#pre-compilation
- parsers:
Object- Define custom parsers
- css:
Function- See more: http://riotjs.com/api/compiler/#css-parser
- js:
Function- See more: http://riotjs.com/api/compiler/#js-parser
- html:
Function- See more: http://riotjs.com/api/compiler/#html-parser
Installation
% npm install gulp-riottsRequirements
- Node.js
- gulp
