Treeprit.Code.load_scripts
You're seeing just the function
load_scripts
, go back to Treeprit.Code module for more information.
Specs
load_scripts(String.t()) :: :ok | :throw
Load scripts inside a folder
Example
# inside your seed.exs file
Treeprit.Code.load_scripts("repo/seeds")
Treeprit.new()
|> Treeprit.run(:role, MyProject.Seeds.Role)
|> Treeprit.run(:user, MyProject.Seeds.User)
|> Treeprit.run_if_env(:user_admin, MyProject.Seeds.UserAdmin, :dev)
|> Treeprit.finally()
Specs
It is the same for load_script/1
, but the first argument is the application name.