NAME
Dancer::Plugin::Transformator - Dancer plugin for Net::NodeTransformator
VERSION
version 0.001
SYNOPSIS
use Dancer::Plugin::Transformator;
set plugins => {
Transformator => {
connect => 'localhost:12345',
}
};
get '/' => sub {
transform_output 'jade';
transform_output 'minify_html';
return template 'index';
};
METHODS
transform($engine, $input[, $data])
A wrapper method for Net::NodeTransformator::transform.
transform_output($engine[, $data])
Creates an after-hook and transform the response content via specified engine. Multiple calls of this method causes the engines to be chained. In the synopsis example above, the content of the template output is first transformed via jade and then minified. The argument $data
is only meaningful for jade engine.
PLUGIN CONFIGURATION
The plugin needs only one setting, the connect
parameter. See documentation of Net::NodeTransformator for more information about the syntax. If omitted, a standalone server will be started.
SEE ALSO
1;
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/zurborg/libdancer-plugin-transformator-perl/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
David Zurborg <zurborg@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by David Zurborg.
This is free software, licensed under:
The ISC License