Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Latest commit

 

History

History
129 lines (95 loc) · 3.73 KB

README.md

File metadata and controls

129 lines (95 loc) · 3.73 KB

DEPRECATED / ARCHIVED

This functionality is now available in the far more streamlined project https://github.com/lfe-rebar3/rebar3_lfe

lfe-compile

Build Status LFE Versions Erlang Versions Tags Downloads

The LFE rebar3 compiler plugin

Contents

About

Of all the rebar3 plugins for LFE, this one is the most important (it's also the only one not written in LFE itself). All other LFE plugins depend upon this one.

Note that the LFE rebar3 plugins are not intended to be used as projects or tools in their own right -- they need to be incorporated into another project. You can add any LFE rebar3 plugin to your project, of course, but the intent is for a new tool to wrap all of them. This tool is simply called ltool. The hope is that it will replace all the functionality that currently is built into lfetool.

If you would like to use this plugin in your own project, without a wrapping tool, see the "Use" section below.

Build

$ rebar3 compile

Use

Add the plugin to your rebar.config:

Using GitHub:

{plugins, [
   {'lfe-compile',
    {git, "git://github.com/lfe-rebar3/compile.git",
      {tag, "0.7.0"}}}
  ]}.

Using Gitlab:

{plugins, [
   {'lfe-compile',
    {git, "git://gitlab.com/lfe-rebar3/compile.git",
      {tag, "0.7.0"}}}
  ]}.

Using Hex:

{plugins, [
   {'lfe-compile', "0.7.0", {pkg, rebar3_lfe_compile}}
  ]}.

Then let rebar3 know that you want to call lfe compile after the rebar3 compile task. Do this by adding the following provider hook in your rebar.config file:

{provider_hooks, [
   {post, [{compile, {lfe, compile}}]}
  ]}.

Then just compile from your project directory:

$ rebar3 compile
...

This will first download and build all your project dependencies, then compile all Erlang-related files your project may have, and finally it will compile the .lfe files in your project.

If you would just like to to compile the .lfe files, you can use the following command:

$ rebar3 lfe compile
...

For a more detailed description of how to use the rebar3 LFE plugins, refer to this blog post. Note that the version numbers in the post are outdated now, but the general ideas are still valid.