Skip to content

Commit

Permalink
clarify what's option in phx.new
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Apr 14, 2024
1 parent aeb6640 commit da8d8e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions guides/introduction/up_and_running.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ We can run `mix phx.new` from any directory in order to bootstrap our Phoenix ap
$ mix phx.new hello
```

> A note about [Ecto](ecto.html): Ecto allows our Phoenix application to communicate with a data store, such as PostgreSQL, MySQL, and others. If our application will not require this component we can skip this dependency by passing the `--no-ecto` flag to `mix phx.new`.
> To learn more about `mix phx.new` you can read the [Mix Tasks Guide](mix_tasks.html#phoenix-specific-mix-tasks).
> A note about what's included: By default `mix phx.new` adds a number of optional libraries and generates the config and integration code needed in your application, for example:
> - [Ecto](ecto.html) allows our Phoenix application to communicate with a data store, such as PostgreSQL, MySQL, and others. If our application will not require this component we can skip this dependency by passing the `--no-ecto` flag to `mix phx.new`.
> - [Phoenix.HTML](https://hexdocs.pm/phoenix_html/Phoenix.HTML.html), [TailwindCSS](https://tailwindcss.com), and [Esbuild](https://esbuild.github.io) for basic web applications, which you can exclude with `--no-html` and `--no-assets` for API-only applications.
> - [Phoenix.LiveView](https://hexdocs.pm/phoenix_live_view/) for interactive web applications, which you can exclude with `--no-live`.
> - Read the [Mix Tasks Guide](mix_tasks.html#phoenix-specific-mix-tasks) for the full list of things that can be excluded, among other options.
```console
mix phx.new hello
Expand Down
4 changes: 2 additions & 2 deletions guides/json_and_apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ The output should contain the following:
track JavaScript dependencies
• --no-gettext - do not generate gettext files
• --no-html - do not generate HTML views
• --no-live - comment out LiveView socket setup in
assets/js/app.js. Automatically disabled if --no-html is given
• --no-live - comment out LiveView socket setup in your Endpoint
and assets/js/app.js. Automatically disabled if --no-html is given
• --no-mailer - do not generate Swoosh mailer files
• --no-tailwind - do not include tailwind dependencies and
assets. The generated markup will still include Tailwind CSS
Expand Down
4 changes: 2 additions & 2 deletions installer/lib/mix/tasks/phx.new.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ defmodule Mix.Tasks.Phx.New do
* `--no-html` - do not generate HTML views
* `--no-live` - comment out LiveView socket setup in assets/js/app.js.
Automatically disabled if --no-html is given
* `--no-live` - comment out LiveView socket setup in in your Endpoint
and assets/js/app.js. Automatically disabled if --no-html is given
* `--no-mailer` - do not generate Swoosh mailer files
Expand Down

0 comments on commit da8d8e3

Please sign in to comment.