Skip to content

Commit

Permalink
Docs/remix inferred targets (#21214)
Browse files Browse the repository at this point in the history
Co-authored-by: Colum Ferry <[email protected]>
  • Loading branch information
isaacplmann and Coly010 authored Jan 18, 2024
1 parent 19540b8 commit 4c49e59
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
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

0 comments on commit 4c49e59

Please sign in to comment.