/globule

Primary LanguageElixir

Globule

Simple utility to combine a repo of source code into a single file, suitable for using as overlay data in creating a code poster, along the lines of commits.io

Usage

There is an executable included, globule, which can be run on any system with erlang installed.

cd into project directory where desrired source code is and run

globule

This will output a file, ./glob containing all source contained in the default folders, and having the default file extensions.

Default folders:

  • './app'
  • './lib'
  • './test'
  • './spec'

Default extensions:

  • '.ex'
  • '.exs'
  • '.rb'
  • '.js'

TODO

  • Accept source dirs and extensions as arguments, or via a config file

Installation

To install the executable locally, from this project root directory, run:

mix escript.install

Add your escripts directory to your PATH for convenient invocation. More info here

If available in Hex, the package can be installed by adding globule to your list of dependencies in mix.exs:

def deps do
  [
    {:globule, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/globule.