mix potionx.new (potionx_new v0.0.13) View Source

Creates a new Potionx project.

It expects the path of the project as an argument.

mix potionx.new PATH [--module MODULE] [--app APP]

A project at the given PATH will be created. The application name and module name will be retrieved from the path, unless --module or --app is given.

Options

  • --live - include Phoenix.LiveView to make it easier than ever to build interactive, real-time applications

  • --umbrella - generate an umbrella project, with one application for your domain, and a second application for the web interface.

  • --app - the name of the OTP application

  • --module - the name of the base module in the generated skeleton

  • --database - specify the database adapter for Ecto. One of:

  • --no-webpack - do not generate webpack files for static asset building. When choosing this option, you will need to manually handle JavaScript dependencies if building HTML apps

  • --no-ecto - do not generate Ecto files.

  • --no-html - do not generate HTML views.

  • --no-gettext - do not generate gettext files.

  • --no-dashboard - do not include Phoenix.LiveDashboard

  • --binary-id - use binary_id as primary key type in Ecto schemas

  • --verbose - use verbose output

Installation

mix potionx.new by default prompts you to fetch and install your dependencies. You can enable this behaviour by passing the --install flag or disable it with the --no-install flag.

Examples

mix potionx.new hello_world

Is equivalent to:

mix potionx.new hello_world --module HelloWorld

Would generate the following directory structure and modules:

hello_umbrella/   Hello.Umbrella
  apps/
    hello/        Hello
    hello_web/    HelloWeb

You can read more about umbrella projects using the official Elixir guide

To print the Phoenix installer version, pass -v or --version, for example:

mix potionx.new -v

Link to this section Summary

Link to this section Functions

Link to this function

ask_for_local_postgres_password(project)

View Source
Link to this function

ask_for_local_postgres_user(project)

View Source
Link to this function

generate(base_path, generator, path, opts)

View Source
Link to this function

generate_default_graphql(project, path_key)

View Source
Link to this function

install_pow_assent(project, path_key)

View Source

Callback implementation for Mix.Task.run/1.

Link to this function

run(argv, generator, path)

View Source
Link to this function

run_migrations(project, path_key)

View Source
Link to this function

run_seed(project, path_key)

View Source