Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rebar support for minification of JavaScript files.
Erlang
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
Makefile
README.md
rebar.config

README.md

Rebar JS Uglifier Plugin

Minify your JavaScript files when building your Erlang OTP application using UglifyJS.

Installation

Specify rebar_js_uglifier_plugin as a dependency in your rebar.config.

{deps, [
       {rebar_js_uglifier_plugin, ".*",
        {git, "git://github.com/cmeiklejohn/rebar_js_uglifier_plugin.git", {branch, "master"}}}
]}.

Then, configure as a plugin in your rebar.config.

{plugins, [rebar_js_uglifier_plugin]}.

Configuration

Below is an example configuration with one minification. In this example vendor.js is the destination minified file, sourced from vendor.js. Place the below configuration in your applications rebar.config.

{js_uglifier, [
    {doc_root,   "priv/assets/javascripts"},
    {out_dir,    "priv/www/javascripts"},
    {compressions, [
        {"vendor.min.js", "vendor.js"}
    ]}
]}.
Something went wrong with that request. Please try again.