Deprecated.
The maintainer of this distribution has indicated that it is deprecated and no longer suitable for use.
NAME
Mojolicious::Plugin::Riotjs - DEPRECATED
VERSION
0.06
DESCRIPTION
Mojolicious::Plugin::Riotjs will be DEPRECATED.
Use Mojolicious::Plugin::AssetPack::Pipe::Riotjs bundled with Mojolicious::Plugin::AssetPack instead.
From the web page:
A REACT-LIKE, 2.5KB USER INTERFACE LIBRARY
Custom tags - Virtual DOM - Full stack - IE8
Dependencies
Riot is required for this module to work. You can install Riot with npm:
$ sudo apt-get install npm
$ npm install riot
SYNOPSIS
use Mojolicious::Lite;
get "/" => "index";
app->plugin("riotjs");
app->asset(
"app.js" => qw(
http://cdnjs.cloudflare.com/ajax/libs/riot/2.0.13/riot.js
/js/todo.tag
/js/main.js
)
);
app->start;
__DATA__
@@ /js/todo.tag
<todo>
<h3>{ opts.title }</h3>
<ul>
<li each={ item, i in items }>{ item.title }</li>
</ul>
<form onsubmit={ add }>
<input>
<button>Add #{ items.length + 1 }</button>
</form>
this.items = []
add(e) {
var input = e.target[0]
if (input.value.length) this.items.push({ title: input.value })
input.value = ''
}
</todo>
@@ /js/main.js
riot.mount('todo')
@@ index.html.ep
<!DOCTYPE html>
<html>
<head>
<title>Riot.js Demo</title>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.5/es5-shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
<script>html5.addElements('todo')</script>
<![endif]-->
</head>
<body>
<todo></todo>
%= asset "app.js"
</body>
</html>
METHODS
node_paths
DEPRECATED.
register
DEPRECATED.
COPYRIGHT AND LICENSE
Copyright (C) 2014, Jan Henning Thorsen
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
AUTHOR
Jan Henning Thorsen - jhthorsen@cpan.org