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:postgres
- via https://github.com/elixir-ecto/postgrexmysql
- via https://github.com/elixir-ecto/myxqlmssql
- via https://github.com/livehelpnow/tds Please check the driver docs for more information and requirements. Defaults to "postgres".
--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
- usebinary_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
Functions
Callback implementation for Mix.Task.run/1
.