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

Docs/remix inferred targets #21214

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions docs/generated/packages/remix/documents/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,50 @@ yarn add -D @nx/remix
npm install -D @nx/remix
```

### Enabled Inferred Tasks

{% callout type="note" title="Inferred Tasks" %}
In Nx version 17.3, the `@nx/remix` plugin can create [inferred tasks](/concepts/inferred-tasks) for projects that have a Remix configuration file present. This means you can run `nx build my-project`, `nx serve my-project`, `nx start my-project` or `nx typecheck my-project` for that project, even if there are no `build`, `serve`, `start` or `typecheck` tasks defined in `package.json` or `project.json`.
{% /callout %}

#### Setup

To enable inferred tasks, add `@nx/remix/plugin` to the `plugins` array in `nx.json`.

```json {% fileName="nx.json" %}
{
"plugins": [
{
"plugin": "@nx/remix/plugin",
"options": {
"buildTargetName": "build",
"serveTargetName": "serve",
"startTargetName": "start",
"typecheckTargetName": "typecheck"
}
}
]
}
```

### Task Inference Process

#### Identify Valid Projects

The `@nx/remix/plugin` plugin will create a task for any project that has a Remix configuration file present. Any of the following files will be recognized as a Remix configuration file:

- `remix.config.js`
- `remix.config.mjs`
- `remix.config.cjs`

#### Name the Inferred Task

Once a Remix configuration file has been identified, the targets are created with the name you specify under `buildTargetName`, `serveTargetName`, `startTargetName` or `typecheckTargetName` in the `nx.json` `plugins` array. The default names for the inferred tasks are `build`, `serve`, `start` and `typecheck`.

#### View and Edit Inferred Tasks

To view inferred tasks for a project, open the [project details view](/concepts/inferred-tasks) in Nx Console or run `nx show project my-project` in the command line. Nx Console also provides a quick way to override the settings of an inferred task.

## Using the Remix Plugin

## Generate a Remix Application
Expand Down
44 changes: 44 additions & 0 deletions docs/shared/packages/remix/remix-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,50 @@ yarn add -D @nx/remix
npm install -D @nx/remix
```

### Enabled Inferred Tasks

{% callout type="note" title="Inferred Tasks" %}
In Nx version 17.3, the `@nx/remix` plugin can create [inferred tasks](/concepts/inferred-tasks) for projects that have a Remix configuration file present. This means you can run `nx build my-project`, `nx serve my-project`, `nx start my-project` or `nx typecheck my-project` for that project, even if there are no `build`, `serve`, `start` or `typecheck` tasks defined in `package.json` or `project.json`.
{% /callout %}

#### Setup

To enable inferred tasks, add `@nx/remix/plugin` to the `plugins` array in `nx.json`.

```json {% fileName="nx.json" %}
{
"plugins": [
{
"plugin": "@nx/remix/plugin",
"options": {
"buildTargetName": "build",
"serveTargetName": "serve",
"startTargetName": "start",
"typecheckTargetName": "typecheck"
}
}
]
}
```

### Task Inference Process

#### Identify Valid Projects

The `@nx/remix/plugin` plugin will create a task for any project that has a Remix configuration file present. Any of the following files will be recognized as a Remix configuration file:

- `remix.config.js`
- `remix.config.mjs`
- `remix.config.cjs`

#### Name the Inferred Task

Once a Remix configuration file has been identified, the targets are created with the name you specify under `buildTargetName`, `serveTargetName`, `startTargetName` or `typecheckTargetName` in the `nx.json` `plugins` array. The default names for the inferred tasks are `build`, `serve`, `start` and `typecheck`.

#### View and Edit Inferred Tasks

To view inferred tasks for a project, open the [project details view](/concepts/inferred-tasks) in Nx Console or run `nx show project my-project` in the command line. Nx Console also provides a quick way to override the settings of an inferred task.

## Using the Remix Plugin

## Generate a Remix Application
Expand Down