docs(nx-dev): move plugin features under core features

This commit is contained in:
Miroslav Jonas 2023-07-24 10:20:36 +02:00 committed by Juri Strumpflohner
parent 21d3c5e63c
commit 2fc3e2e485
23 changed files with 123 additions and 58 deletions

View File

@ -832,6 +832,31 @@
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Plugin Features",
"path": "/core-features/plugin-features",
"id": "plugin-features",
"isExternal": false,
"children": [
{
"name": "Use Task Executors",
"path": "/core-features/plugin-features/use-task-executors",
"id": "use-task-executors",
"isExternal": false,
"children": [],
"disableCollapsible": false
},
{
"name": "Use Code Generators",
"path": "/core-features/plugin-features/use-code-generators",
"id": "use-code-generators",
"isExternal": false,
"children": [],
"disableCollapsible": false
}
],
"disableCollapsible": false
}
],
"disableCollapsible": false
@ -902,13 +927,13 @@
},
{
"name": "Plugin Features",
"path": "/plugin-features",
"path": "/core-features/plugin-features",
"id": "plugin-features",
"isExternal": false,
"children": [
{
"name": "Use Task Executors",
"path": "/plugin-features/use-task-executors",
"path": "/core-features/plugin-features/use-task-executors",
"id": "use-task-executors",
"isExternal": false,
"children": [],
@ -916,7 +941,7 @@
},
{
"name": "Use Code Generators",
"path": "/plugin-features/use-code-generators",
"path": "/core-features/plugin-features/use-code-generators",
"id": "use-code-generators",
"isExternal": false,
"children": [],
@ -927,7 +952,7 @@
},
{
"name": "Use Task Executors",
"path": "/plugin-features/use-task-executors",
"path": "/core-features/plugin-features/use-task-executors",
"id": "use-task-executors",
"isExternal": false,
"children": [],
@ -935,7 +960,7 @@
},
{
"name": "Use Code Generators",
"path": "/plugin-features/use-code-generators",
"path": "/core-features/plugin-features/use-code-generators",
"id": "use-code-generators",
"isExternal": false,
"children": [],

View File

@ -1033,6 +1033,37 @@
"isExternal": false,
"path": "/core-features/enforce-project-boundaries",
"tags": ["enforce-project-boundaries"]
},
{
"id": "plugin-features",
"name": "Plugin Features",
"description": "Learn what is a plugin, the different type of plugins and how to create one.",
"file": "",
"itemList": [
{
"id": "use-task-executors",
"name": "Use Task Executors",
"description": "",
"file": "shared/plugin-features/use-task-executors",
"itemList": [],
"isExternal": false,
"path": "/core-features/plugin-features/use-task-executors",
"tags": ["use-task-executors"]
},
{
"id": "use-code-generators",
"name": "Use Code Generators",
"description": "",
"file": "shared/plugin-features/use-code-generators",
"itemList": [],
"isExternal": false,
"path": "/core-features/plugin-features/use-code-generators",
"tags": ["use-code-generators"]
}
],
"isExternal": false,
"path": "/core-features/plugin-features",
"tags": []
}
],
"isExternal": false,
@ -1119,7 +1150,7 @@
"path": "/core-features/enforce-project-boundaries",
"tags": ["enforce-project-boundaries"]
},
"/plugin-features": {
"/core-features/plugin-features": {
"id": "plugin-features",
"name": "Plugin Features",
"description": "Learn what is a plugin, the different type of plugins and how to create one.",
@ -1132,7 +1163,7 @@
"file": "shared/plugin-features/use-task-executors",
"itemList": [],
"isExternal": false,
"path": "/plugin-features/use-task-executors",
"path": "/core-features/plugin-features/use-task-executors",
"tags": ["use-task-executors"]
},
{
@ -1142,32 +1173,32 @@
"file": "shared/plugin-features/use-code-generators",
"itemList": [],
"isExternal": false,
"path": "/plugin-features/use-code-generators",
"path": "/core-features/plugin-features/use-code-generators",
"tags": ["use-code-generators"]
}
],
"isExternal": false,
"path": "/plugin-features",
"path": "/core-features/plugin-features",
"tags": []
},
"/plugin-features/use-task-executors": {
"/core-features/plugin-features/use-task-executors": {
"id": "use-task-executors",
"name": "Use Task Executors",
"description": "",
"file": "shared/plugin-features/use-task-executors",
"itemList": [],
"isExternal": false,
"path": "/plugin-features/use-task-executors",
"path": "/core-features/plugin-features/use-task-executors",
"tags": ["use-task-executors"]
},
"/plugin-features/use-code-generators": {
"/core-features/plugin-features/use-code-generators": {
"id": "use-code-generators",
"name": "Use Code Generators",
"description": "",
"file": "shared/plugin-features/use-code-generators",
"itemList": [],
"isExternal": false,
"path": "/plugin-features/use-code-generators",
"path": "/core-features/plugin-features/use-code-generators",
"tags": ["use-code-generators"]
},
"/concepts": {

View File

@ -434,7 +434,7 @@
"file": "shared/plugin-features/use-task-executors",
"id": "use-task-executors",
"name": "Use Task Executors",
"path": "/plugin-features/use-task-executors"
"path": "/core-features/plugin-features/use-task-executors"
},
{
"description": "",
@ -541,7 +541,7 @@
"file": "shared/plugin-features/use-code-generators",
"id": "use-code-generators",
"name": "Use Code Generators",
"path": "/plugin-features/use-code-generators"
"path": "/core-features/plugin-features/use-code-generators"
},
{
"description": "",

View File

@ -1,4 +1,4 @@
Nx plugins are npm packages that contain [generators](/plugin-features/use-code-generators) and [executors](/plugin-features/use-task-executors) to extend a Nx workspace.
Nx plugins are npm packages that contain [generators](/core-features/plugin-features/use-code-generators) and [executors](/core-features/plugin-features/use-task-executors) to extend a Nx workspace.
This package contains tooling to help plugin authors create and maintain plugins.

View File

@ -316,8 +316,6 @@
"id": "enforce-project-boundaries",
"tags": ["enforce-project-boundaries"],
"file": "shared/core-features/enforce-project-boundaries"
}
]
},
{
"name": "Plugin Features",
@ -337,6 +335,8 @@
"file": "shared/plugin-features/use-code-generators"
}
]
}
]
},
{
"name": "Concepts",

View File

@ -13,7 +13,7 @@ In this tutorial you:
{% card title="Core Features" description="Read about the core features of Nx." url="/core-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/plugin-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/core-features/plugin-features" /%}
{% card title="Mental Model" description="Get a deeper understanding of the mental model." url="/concepts/mental-model" /%}

View File

@ -13,7 +13,7 @@ In this tutorial you:
{% card title="Core Features" description="Read about the core features of Nx." url="/core-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/plugin-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/core-features/plugin-features" /%}
{% card title="Mental Model" description="Get a deeper understanding of the mental model." url="/concepts/mental-model" /%}

View File

@ -33,7 +33,7 @@ Bazel and Nx (with plugins) support this style.
## Standalone Applications
Nx plugins, especially the [generators](/plugin-features/use-code-generators), [executors](/plugin-features/use-task-executors) and [migrations](/core-features/automate-updating-dependencies) that come with them, are not only valuable for a monorepo scenario. In fact, many developers use Nx not primarily for its monorepo support, but for its tooling support, particularly its ability to modularize a codebase and, thus, better scale it. In v15.3, Nx introduced support for Standalone Applications. It is like an integrated monorepo setup, but with just a single, root-level application. Think of it as an advanced, more capable Create-React-App or Angular CLI. And obviously, you can still leverage all the generators and executors and structure your application into libraries or submodules.
Nx plugins, especially the [generators](/core-features/plugin-features/use-code-generators), [executors](/core-features/plugin-features/use-task-executors) and [migrations](/core-features/automate-updating-dependencies) that come with them, are not only valuable for a monorepo scenario. In fact, many developers use Nx not primarily for its monorepo support, but for its tooling support, particularly its ability to modularize a codebase and, thus, better scale it. In v15.3, Nx introduced support for Standalone Applications. It is like an integrated monorepo setup, but with just a single, root-level application. Think of it as an advanced, more capable Create-React-App or Angular CLI. And obviously, you can still leverage all the generators and executors and structure your application into libraries or submodules.
{% cards %}
{% card title="Standalone Applications with Nx" description="Learn what Standlone Apps are and how Nx can be useful" type="video" url="https://youtu.be/qEaVzh-oBBc" /%}

View File

@ -22,8 +22,8 @@ Nx is built in a modular fashion to let you only use the features you need.
![High-level Nx architecture](/shared/images/nx-architecture.svg)
- The **Nx** package provides fundamental technology-agnostic capabilities such as: [workspace analysis](/core-features/explore-graph), [task running](/core-features/run-tasks), [caching](/core-features/cache-task-results), [distribution](/core-features/distribute-task-execution), [code generation](/plugin-features/use-code-generators) and [automated code migrations](/core-features/automate-updating-dependencies).
- **Plugins** are NPM packages that built on top of the fundamental capabilities provided by the Nx package. Nx plugins contain [code generators](/plugin-features/use-code-generators), [executors](/plugin-features/use-task-executors) (to abstract lower-level build tooling) and automated code migrations for keeping your tools up to date. Contrary to the Nx package, which works the same way with any JS or non-JS project, plugins are usually technology specific. For instance, `@nx/react` adds support for building React apps and libs, `@nx/cypress` adds e2e testing capabilities with Cypress. Plugins make developers more productive by removing any friction of integrating different tools with each other and by providing utilities to keep them up to date. The Nx team maintains plugins for React, Next, Remix, Angular, Jest, Cypress, Storybook and more. You can use the `@nx/plugin` package to easily [scaffold a new plugin](/plugins/intro/getting-started) or even just [automate your local workspace](/plugins/recipes/local-generators). There are also more than 80 [community plugins](/plugins/registry).
- The **Nx** package provides fundamental technology-agnostic capabilities such as: [workspace analysis](/core-features/explore-graph), [task running](/core-features/run-tasks), [caching](/core-features/cache-task-results), [distribution](/core-features/distribute-task-execution), [code generation](/core-features/plugin-features/use-code-generators) and [automated code migrations](/core-features/automate-updating-dependencies).
- **Plugins** are NPM packages that built on top of the fundamental capabilities provided by the Nx package. Nx plugins contain [code generators](/core-features/plugin-features/use-code-generators), [executors](/core-features/plugin-features/use-task-executors) (to abstract lower-level build tooling) and automated code migrations for keeping your tools up to date. Contrary to the Nx package, which works the same way with any JS or non-JS project, plugins are usually technology specific. For instance, `@nx/react` adds support for building React apps and libs, `@nx/cypress` adds e2e testing capabilities with Cypress. Plugins make developers more productive by removing any friction of integrating different tools with each other and by providing utilities to keep them up to date. The Nx team maintains plugins for React, Next, Remix, Angular, Jest, Cypress, Storybook and more. You can use the `@nx/plugin` package to easily [scaffold a new plugin](/plugins/intro/getting-started) or even just [automate your local workspace](/plugins/recipes/local-generators). There are also more than 80 [community plugins](/plugins/registry).
- **Devkit** is a set of utilities for [building Nx plugins](/plugins/intro/getting-started).
- **Nx Cloud** helps scale your project on CI by [adding remote caching](/concepts/how-caching-works) and [distributed task execution](/more-concepts/illustrated-dte). It also improves developer ergonomics by integrating with GitHub, GitLab and BitBucket and providing searchable structured logs. Learn more at [nx.app](https://nx.app).
- **Nx Console** is an extension for **VSCode, IntelliJ and VIM**. It provides code autocompletion, interactive generators, workspace visualizations, powerful refactorings and more. You can [install it here](/core-features/integrate-with-editors).

View File

@ -69,7 +69,7 @@ In general, you should not replace the configuration files provided for you. You
In addition to configuration files for external libraries, your Nx workspace will have configuration files for Nx itself. This will be `angular.json` for workspaces using the Angular CLI and `project.json` files for workspaces using the Nx CLI. This file will define all of the individual projects in your workspace (of which your application is one) and the tasks available for them.
For example, your generated application should have four [tasks available](/plugin-features/use-task-executors) for it: `build`, `serve`, `lint`, and `test`. Each of these comes with its own configuration. If you find you need to adjust the configuration of a task for your codebase, this is the place to begin looking.
For example, your generated application should have four [tasks available](/core-features/plugin-features/use-task-executors) for it: `build`, `serve`, `lint`, and `test`. Each of these comes with its own configuration. If you find you need to adjust the configuration of a task for your codebase, this is the place to begin looking.
These workspace configuration files can seem a little long and intimidating. The Nx Console can help you navigate it more easily with its Workspace JSON panel. By clicking on a project in your workspace, it will navigate you to the right place in the workspace file to begin making edits.

View File

@ -365,7 +365,7 @@ But migrating AngularJS code means we need to switch some of our tools to a more
npm install -D @nx/web babel-plugin-angularjs-annotate
```
Nx already has most of what you need for webpack added as a dependency. `@nx/web` contains the [executors](/plugin-features/use-task-executors) we need to use to build and serve the application with webpack and
Nx already has most of what you need for webpack added as a dependency. `@nx/web` contains the [executors](/core-features/plugin-features/use-task-executors) we need to use to build and serve the application with webpack and
`babel-plugin-angularjs-annotate` is going to accomplish the same thing that `browserify-ngannotate` previously did in gulp: add dependency injection annotations.
Start with a `webpack.config.js` file in your applications root directory:

View File

@ -19,7 +19,7 @@ In this tutorial you:
{% card title="Core Features" description="Read about the core features of Nx." url="/core-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/plugin-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/core-features/plugin-features" /%}
{% card title="Mental Model" description="Get a deeper understanding of the mental model." url="/concepts/mental-model" /%}

View File

@ -1,4 +1,4 @@
Nx plugins are npm packages that contain [generators](/plugin-features/use-code-generators) and [executors](/plugin-features/use-task-executors) to extend a Nx workspace.
Nx plugins are npm packages that contain [generators](/core-features/plugin-features/use-code-generators) and [executors](/core-features/plugin-features/use-task-executors) to extend a Nx workspace.
This package contains tooling to help plugin authors create and maintain plugins.

View File

@ -1,6 +1,6 @@
# Getting Started with Plugins
Nx plugins contain [generators](/plugin-features/use-code-generators) and [executors](/plugin-features/use-task-executors) that extend the capabilities of an Nx workspace. They can be shared as npm packages or referenced locally within the same repo.
Nx plugins contain [generators](/core-features/plugin-features/use-code-generators) and [executors](/core-features/plugin-features/use-task-executors) that extend the capabilities of an Nx workspace. They can be shared as npm packages or referenced locally within the same repo.
{% cards cols="2" %}
@ -18,8 +18,8 @@ Nx plugins help you scaffold new projects, pre-configure tooling, follow best pr
{% cards cols="2" %}
{% card title="Browse Existing Plugins" description="Find a plugin to use" url="/plugins/registry" /%}
{% card title="Use Task Executors" description="Run operations on your code" url="/plugin-features/use-task-executors" /%}
{% card title="Use Code Generators" description="Create or modify code" url="/plugin-features/use-code-generators" /%}
{% card title="Use Task Executors" description="Run operations on your code" url="/core-features/plugin-features/use-task-executors" /%}
{% card title="Use Code Generators" description="Create or modify code" url="/core-features/plugin-features/use-code-generators" /%}
{% card title="Automate Updating Dependencies" description="Keep code up to date with package breaking changes" url="/core-features/automate-updating-dependencies" /%}
{% /cards %}

View File

@ -13,7 +13,7 @@ In this tutorial you:
{% card title="Core Features" description="Read about the core features of Nx." url="/core-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/plugin-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/core-features/plugin-features" /%}
{% card title="Mental Model" description="Get a deeper understanding of the mental model." url="/concepts/mental-model" /%}

View File

@ -216,7 +216,7 @@ Not all tasks might be cacheable though. You can configure `cacheableOperations`
## Creating New Components
You can just create new React components as you normally would. However, Nx plugins usually also ship [generators](/plugin-features/use-code-generators). They allow you to easily scaffold code, configuration or entire projects. To see what capabilities the `@nx/react` plugin ships, run the following command and inspect the output:
You can just create new React components as you normally would. However, Nx plugins usually also ship [generators](/core-features/plugin-features/use-code-generators). They allow you to easily scaffold code, configuration or entire projects. To see what capabilities the `@nx/react` plugin ships, run the following command and inspect the output:
```shell {% command="npx nx list @nx/react" path="myreactapp" %}

View File

@ -13,7 +13,7 @@ In this tutorial you:
{% card title="Core Features" description="Read about the core features of Nx." url="/core-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/plugin-features" /%}
{% card title="Plugin Features" description="Read about the plugin features of Nx." url="/core-features/plugin-features" /%}
{% card title="Mental Model" description="Get a deeper understanding of the mental model." url="/concepts/mental-model" /%}

View File

@ -11,7 +11,7 @@ width="100%" /%}
## What is a preset?
At its core, a preset is a special [generator](/plugin-features/use-code-generators) that is shipped as part of an Nx Plugin package.
At its core, a preset is a special [generator](/core-features/plugin-features/use-code-generators) that is shipped as part of an Nx Plugin package.
All first-party Nx presets are built into Nx itself, but you can [create your own plugin](/plugins/intro/getting-started) and create a generator with the magic name: `preset`. Once you've [published your plugin](/plugins/tutorials/publish-plugin) on npm, you can now run the `create-nx-workspace` command with the preset option set to the name of your published package.

View File

@ -74,13 +74,13 @@ A system for running [tasks](#task) in CI across multiple agent processes in the
A script that performs some action on your code. This can include building, linting, testing, serving and many other actions. A [target](#target) configuration specifies an executor and a set of options. Executors can be found in [plugins](#plugin).
> See: [Use Task Executors](/plugin-features/use-task-executors)
> See: [Use Task Executors](/core-features/plugin-features/use-task-executors)
### Generator
A script that creates or modifies your code. Generators can be found in [plugins](#plugin).
> See: [Use Code Generators](/plugin-features/use-code-generators)
> See: [Use Code Generators](/core-features/plugin-features/use-code-generators)
### Graph

View File

@ -1,7 +1,7 @@
# Project Configuration
Projects can be configured in `package.json` (if you use npm scripts and not Nx executors) and `project.json` (if you
[use task executors](/plugin-features/use-task-executors)). Both `package.json` and `project.json` files are located in each project's folder. Nx merges the two
[use task executors](/core-features/plugin-features/use-task-executors)). Both `package.json` and `project.json` files are located in each project's folder. Nx merges the two
files to get each project's configuration.
The following configuration creates `build` and `test` targets for Nx.

View File

@ -57,9 +57,9 @@
- [Integrate with Editors](/core-features/integrate-with-editors)
- [Automate Updating Dependencies](/core-features/automate-updating-dependencies)
- [Enforce Project Boundaries](/core-features/enforce-project-boundaries)
- [Plugin Features](/plugin-features)
- [Use Task Executors](/plugin-features/use-task-executors)
- [Use Code Generators](/plugin-features/use-code-generators)
- [Plugin Features](/core-features/plugin-features)
- [Use Task Executors](/core-features/plugin-features/use-task-executors)
- [Use Code Generators](/core-features/plugin-features/use-code-generators)
- [Concepts](/concepts)
- [Integrated Repos vs. Package-Based Repos vs. Standalone Apps](/concepts/integrated-vs-package-based)
- [Mental Model](/concepts/mental-model)

View File

@ -10,7 +10,6 @@ export function getBasicNxSection(items: MenuItem[]): MenuSection {
(m) =>
m.id === 'getting-started' ||
m.id === 'core-features' ||
m.id === 'plugin-features' ||
m.id === 'concepts' ||
m.id === 'recipes' ||
m.id === 'reference'

View File

@ -226,11 +226,13 @@ const diataxis = {
'/migration/preserving-git-histories':
'/recipes/adopting-nx/preserving-git-histories',
'/migration/manual': '/recipes/adopting-nx/manual',
'/executors/using-builders': '/plugin-features/use-task-executors',
'/executors/using-builders':
'/core-features/plugin-features/use-task-executors',
'/executors/run-commands-builder': '/recipes/executors/run-commands-executor',
'/executors/creating-custom-builders':
'/recipes/executors/creating-custom-executors',
'/generators/using-generators': '/plugin-features/use-code-generators',
'/generators/using-generators':
'/core-features/plugin-features/use-code-generators',
'/generators/workspace-generators':
'/recipes/generators/workspace-generators',
'/generators/composing-generators':
@ -693,6 +695,13 @@ const missingAndCatchAllRedirects = {
'/nx-console': '/using-nx/console',
};
const movePluginFeaturesToCore = {
'/plugin-features/use-task-executors':
'/core-features/plugin-features/use-task-executors',
'/plugin-features/use-code-generators':
'/core-features/plugin-features/use-code-generators',
};
/**
* Public export API
*/
@ -713,4 +722,5 @@ module.exports = {
pluginUrls,
referenceUrls,
missingAndCatchAllRedirects,
movePluginFeaturesToCore,
};