rebar3
rebar3 copied to clipboard
A comprehensive LFE rebar3 plugin for all your LFE tooling needs
rebar3_lfe
A comprehensive LFE rebar3 plugin for all your LFE tooling needs
Contents
- About
- Features
- Setup
- Documentation
About ↟
This plugin originally started life as a shell script (lfetool -- there's
even a T-shirt for it!), then it toyed with integrating with rebar (the
original). Around that time, though, rebar3 was under initial development,
and LFE took a chance on it as an early adopter. This lead to a whole series of
LFE plugins, but after a few years momentum was lost.
Those early rebar3 efforts have been combined into a single plugin in this
project, with many updates and using all the latest approaches developed in
rebar3's now mature ecosystem.
Features ↟
- Create new LFE projects:
rebar3 new lfe-librebar3 new lfe-mainrebar3 new lfe-escriptrebar3 new lfe-apprebar3 new lfe-release
- Create new LFE behaviour files:
rebar3 new lfe-sup name=my-suprebar3 new lfe-server name=my-serverrebar3 new lfe-statem-handle-event name=my-statemrebar3 new lfe-statem-state-functions name=my-statem
- Start up an LFE REPL:
rebar3 lfe repl
- Compile LFE source code:
rebar3 lfe compile
- Run tests using the LFE testing library (wrapper for eunit)
rebar3 lfe ltestrebar3 lfe ltest -tunitrebar3 lfe ltest -tsystemrebar3 lfe ltest -tintegrationrebar3 lfe ltest -tall
- Run an LFE project's
main/1function as an lfescript (runrebar3 new lfe-mainto see an example):rebar3 lfe runrebar3 lfe run -- 1 2 5rebar3 lfe run -main some/path/main.lfe
- Escriptize an LFE escript project:
rebar3 ecsriptize
- Run an escriptized LFE escript project:
rebar3 lfe run-ecsript
- Generate an LFE/OTP release
rebar3 release
- Run an LFE/OTP release project's release script (
COMMANDcan bestart,stop,status,ping, etc.):rebar3 lfe run-release COMMAND
- Convert LFE data files to Erlang data file
rebar3 lfe confabulate lfe-data.lfe erl_data.erl
- Cleanup
rebar3 lfe cleanrebar3 lfe clean-buildrebar3 lfe clean-cacherebar3 lfe clean-all
- Metadata
rebar3 lfe versions
Setup ↟
Add the plugin to your rebar.config (stable):
{plugins, [
{rebar3_lfe, "0.4.10"}
]}.
Upgrading rebar3_lfe Globally
If you have installed the rebar3_lfe plugin to be available system wide, and you need to update it, the cleanest way to do this is following these steps:
- edit the
rebar3_lfeentry in~/.config/rebar3/rebar.configto point to the version you want to use - delete the existing plugins with
rm -rf ~/.cache/rebar3/plugins/*lfe* - execute a command from the plugin (such as
rebar3 lfe versions) to automatically download the newly configured version
Documentation ↟
Detailed usage is provided in the project documentation.