Boilex is mix-based Elixir development tool. It
- generates dev tools configurations for
- static bytecode analysis
- source code analysis
- test coverage analysis
- generates Circleci configurations for
- testing
- building docker images + pushing to Dockerhub
- building project documentation + ERD
- generates Docker configurations
- generates development scripts (for remote debugging etc)
- provides releases versioning
Add the following parameters to deps function in mix.exs file
# development tools
{:excoveralls, "~> 0.8", runtime: false},
{:dialyxir, "~> 0.5", runtime: false},
{:ex_doc, "~> 0.19", runtime: false},
{:credo, "~> 0.9", runtime: false},
{:boilex, "~> 0.2", runtime: false},
Command mix boilex.init generates development tools configuration files in already existing Elixir project. It can be used with any Elixir or Phoenix application except umbrella projects. To generate configuration execute this command and follow instructions.
cd ./myproject
mix deps.get && mix compile
mix boilex.init
Coverallstool will help you to check test coverage for each module of new project. Can be configured withcoveralls.jsonfile. It's recommended to keep minimal test coverage = 100%.Dialyzeris static analysis tool for BEAM bytecode. Most useful feature of this tool is perfect type inference what will work in your project from-the-box without writing any explicit function specs or any other overhead. Can be configured with.dialyzer_ignorefile.ExDocis a tool to generate beautiful documentation for your Elixir projects.Credostatic code analysis tool will make your code pretty and consistent. Can be configured with.credo.exsfile.scriptsdirectory contains auto-generated bash helper scripts.
Script bumps version, creates new release, updates changelog and pushes new tag to github. Argument is one of patch | minor | major. Example:
mix boilex.release patch
Task is wrapper around standard mix hex.publish but it prevents accidental pushing of private organization packages to open-source. Can accept optional --confirm-public flag to enforce open-source push.
mix boilex.hex.publish [--confirm-public]
Some mix tasks are made to use by CI. But of course tasks can be executed locally if needed. List of tasks:
mix help | grep "boilex\.ci"
.envtext file contains variables are required by some scripts and mix tasks.start.shlocally starts compiled application.pre-commit.shis git pre-commit hook. This script will compile project and execute all possible checks. Script will not let you make commits before all issues generated by compiler and static analysis tools will be fixed and all tests will pass.remote-iex.shprovides direct access to remote erlang node throughiex.cluster-iex.shconnects current erlang node to remote erlang node. All local debug tools (for example Observer) are available to debug remote node. Hot code reloading is also available.docs.shcreates and opens project documentation.coverage.shcreates and opens project test coverage report.
Some system variables are required by some scripts, description of all variables
ERLANG_HOSTremote hostname to connect, example: www.elixir-app.comERLANG_OTP_APPLICATIONlowercase and snakecase standard OTP application name, example: elixir_appERLANG_COOKIEremote Erlang node cookie, example: OEBy/p9vFWi85XTeYOUvIwLr/sZctkHPKWNxfTtf81M=ENABLE_DIALYZERrun Dialyzer checks in pre-commit hooks or not, example: falseCHANGELOG_GITHUB_TOKENis token for github_changelog_generator utility. Token is required for private repos. Reference is HERE.
Variables can be defined in scripts/.env file locally (useful for development) or globally in the system.
- Add standard project template generator.
- Add phoenix project generator with option "--without-crap" to avoid JS, CSS, other unnecessary static stuff and unnecessary Elixir code.
- Make files generator more configurable.