NAME

Mojolicious::Plugin::AssetPack::Pipe::ElmLang - process .elm files

VERSION

0.4.2

DESCRIPTION

Mojolicious::Plugin::AssetPack::Pipe::ElmLang will process http://elm-lang.org/ files into JavaScript.

This module require the elm-make program to be installed. elm-make will be automatically installed using https://www.npmjs.com/ unless already installed.

SYNOPSIS

use lib '../lib';
use Mojolicious::Lite;

plugin 'AssetPack' => {pipes => ['ElmLang']};

app->asset->process('app.js' => 'test.elm');

# Set up the mojo lite application and start it
get '/' => 'index';
app->start;
__DATA__
@@ index.html.ep
<!DOCTYPE HTML>
<html>
<head>
<title>Test</title>
%= asset 'app.js';
</head>
<body>
<script type="text/javascript">
    Elm.Main.fullscreen()
</script>
</body>
</html>

SEE ALSO

Mojolicious::Plugin::AssetPack.