SvelixirNew.Options (svelixir_new v0.11.0)

Copy Markdown

The mix svelixir.new argv contract.

Illegal combinations are unrepresentable: parse!/1 either returns a fully populated struct or raises. There are no defaults for --base or --github-org — a silent default here would silently generate the wrong project.

Summary

Functions

The dependency line to splice into the generated project's deps/0.

The Mix task that generates this base's stock project.

The argv to hand the generator.

Parses argv into a fully validated %SvelixirNew.Options{}.

Types

base()

@type base() :: :otp | :web

dep_source()

@type dep_source() :: {:hex, String.t()} | {:path, Path.t()}

t()

@type t() :: %SvelixirNew.Options{
  app: atom(),
  base: base(),
  github_org: String.t(),
  module: module(),
  name: String.t(),
  svelixir: dep_source()
}

Functions

dep_line(options)

@spec dep_line(t()) :: binary()

The dependency line to splice into the generated project's deps/0.

generator(options)

@spec generator(t()) :: String.t()

The Mix task that generates this base's stock project.

generator_argv(opts)

@spec generator_argv(t()) :: [String.t()]

The argv to hand the generator.

parse!(argv)

@spec parse!([String.t()]) :: t()

Parses argv into a fully validated %SvelixirNew.Options{}.