NAME Mojolicious::Plugin::Riotjs - A Mojolicious plugin for including riot.js .tag files in your project VERSION 0.02 DESCRIPTION Mojolicious::Plugin::Riotjs is a Mojolicious plugin for including riot.js ".tag" files in your project. It also makes it very easy to bundle the latest riot.js . What is riotjs? 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( /js/todo.tag /js/main.js ) ); app->start; __DATA__ @@ /js/todo.tag

{ opts.title }

  • { item.title }
this.items = [] add(e) { var input =[0] if (input.value.length) this.items.push({ title: input.value }) input.value = '' }
@@ /js/main.js riot.mount('todo') @@ index.html.ep Riot.js Demo %= asset "app.js" METHODS node_paths @paths = $self->node_paths($app); Returns the path to available "node_modules". This is used by "register" to set the "NODE_PATH" environment variable. The default is to look for "node_modules" in current directy and relative to project home. It will also use the current value of "NODE_PATH" if already set. register Will register the Mojolicious::Plugin::Riotjs::Preprocessor with the ".tag" file extension. 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 - ""