NAME

Mojolicious::Plugin::BarefootJS - Mojolicious integration for BarefootJS

SYNOPSIS

# Mojolicious application
$self->plugin('BarefootJS');

# In a controller / template, the `bf` helper exposes a per-request
# BarefootJS runtime backed by BarefootJS::Backend::Mojo.

DESCRIPTION

Wires the BarefootJS server runtime into Mojolicious. It registers a bf controller helper that lazily instantiates one BarefootJS object per request (rendering via BarefootJS::Backend::Mojo), and supports rendering compiled marked templates as Mojolicious templates.

For non-Mojolicious / PSGI hosts, see BarefootJS::Backend::Xslate, which drives the same runtime with Text::Xslate and no web framework.

METHODS

Mojolicious::Plugin::BarefootJS inherits all methods from Mojolicious::Plugin and implements the following new one.

register

$plugin->register(Mojolicious->new, \%conf);

Registers the plugin (the bf helper and supporting hooks) in a Mojolicious application.

SEE ALSO

BarefootJS, BarefootJS::Backend::Mojo, BarefootJS::Backend::Xslate, Mojolicious, https://github.com/piconic-ai/barefootjs

AUTHOR

kobaken <kentafly88@gmail.com>

LICENSE

Copyright (c) 2025-present BarefootJS Contributors.

This library is free software; you can redistribute it and/or modify it under the MIT License. See the LICENSE file in the distribution for the full text.