Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify what's optional in phx.new #5783

Merged
merged 4 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions guides/introduction/up_and_running.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ 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).
> By default, `mix phx.new` includes a number of optional dependencies, for example:
>
> - [Ecto](ecto.html) for communicating with a data store, such as PostgreSQL, MySQL, and others. You can skip this with `--no-ecto`.
>
> - [Phoenix.HTML](https://hexdocs.pm/phoenix_html/Phoenix.HTML.html), [TailwindCSS](https://tailwindcss.com), and [Esbuild](https://esbuild.github.io) for HTML applications. You can skip them with the `--no-html` and `--no-assets` flags.
>
> - [Phoenix.LiveView](https://hexdocs.pm/phoenix_live_view/) for building realtime and interactive web applications. You can skip this 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 your Endpoint
and assets/js/app.js. Automatically disabled if --no-html is given
* `--no-mailer` - do not generate Swoosh mailer files
Expand Down
6 changes: 3 additions & 3 deletions lib/phoenix/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ defmodule Phoenix.Token do
for use in Channels, API authentication, and more.

The data stored in the token is signed to prevent tampering, and is
optionally encrypted. This means that, so long as the
optionally encrypted. This means that, so long as the
key (see below) remains secret, you can be assured that the data
stored in the token has not been tampered with by a third party.
However, unless the token is encrypted, it is not safe to use this
token to store private information, such as a user's sensitive
identification data, as it can be trivially decoded. If the
token is encrypted, its contents will kept secret from the client,
but it is still a best practice to encode as little secret
token is encrypted, its contents will be kept secret from the
client, but it is still a best practice to encode as little secret
information as possible, to minimize the impact of key leakage.

## Example
Expand Down