MonoRepo v0.1.0 MonoRepo.Build View Source

This module holds a set of search path functions for convinient building of paths to parent applications.

These functions take a parent application's name as argument and return a string of unexpanded path to parent application relative to caller's directory . For example: if root_app includes child_app as tier 1 child then calling any function will return "../../specific_path".

Link to this section Summary

Functions

Searches for the root or parent application and returns a path to it's configuration directory.

Searches for the root or parent application and returns a path to it's dependencies directory.

Searches for the root or parent application and returns a path to it's lockfile path directory.

Searches for the root or parent application and returns a path to it's build directory.

Link to this section Functions

Link to this function

build_config_path(parent \\ :root, target \\ Path.join("config", "config.exs"))

View Source
build_config_path(parent :: MonoRepo.parent() | :root, target :: Path.t()) ::
  Path.t()

Searches for the root or parent application and returns a path to it's configuration directory.

The first argument is an application's name as a string, the second one is a path to be appended to parent's application path. Raises RuntimeError in case the path can't be resolved.

Link to this function

build_deps_path(parent \\ :root, target \\ "deps")

View Source
build_deps_path(parent :: MonoRepo.parent() | :root, target :: String.t()) ::
  Path.t()

Searches for the root or parent application and returns a path to it's dependencies directory.

Builds a path to root/parent application's dependencies directory(deps) or raises a RuntimeError. The first argument is an application's name as a string, the second one is a path to be appended to parent's application path.

Link to this function

build_lockfile_path(parent \\ :root, target \\ "mix.lock")

View Source
build_lockfile_path(parent :: MonoRepo.parent() | :root, target :: String.t()) ::
  Path.t()

Searches for the root or parent application and returns a path to it's lockfile path directory.

Builds a path to root/parent application's lockfile(mix.lock) or raises a RuntimeError. The first argument is an application's name as a string, the second one is a path to be appended to parent's application path.

Link to this function

build_path(parent \\ :root, target \\ "_build")

View Source
build_path(parent :: MonoRepo.parent() | :root, target :: String.t()) ::
  Path.t()

Searches for the root or parent application and returns a path to it's build directory.

Builds a path to parent application's build directory(_build) or raises a RuntimeError. The first argument is an application's name as a string, the second one is a path to be appended to parent's application path.