Elmer v0.0.9 Mix.Tasks.Elmer.Gen.Model

This is a mix task for creating a Model template.

Summary

Functions

Creates a new elm Model in your elm path

Functions

run(args)

Creates a new elm Model in your elm path.

Run with mix elmer.gen.model <module name> <args>

Args are similar to phoenix gen arguments where they are in the format “Model field1:type1 fieldN:typeN”

  • Model is the name of the model you want to generate
  • Types will be mapped from elixir (ecto types) to elm

    • :boolean -> Boolean
    • :integer -> Int
    • :float -> Float
    • :string -> String
    • :map -> Record