From 4db6c2db086a785df21cb2ff9fbc1cf7b6335bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Tue, 17 May 2022 19:06:45 +0100 Subject: [PATCH] docs(misc): fix links not handled correctly by redirect rules (#10350) --- docs/generated/packages/linter.json | 2 +- docs/generated/packages/web.json | 2 +- docs/shared/getting-started/nx-and-angular.md | 4 ++-- docs/shared/getting-started/nx-and-react.md | 4 ++-- docs/shared/guides/misc-ngrx.md | 2 +- .../guides/using-tailwind-css-with-angular-projects.md | 2 +- docs/shared/linter-plugin.md | 2 +- docs/shared/migration/manual.md | 4 ++-- docs/shared/node-tutorial/01-create-application.md | 2 +- docs/shared/web-plugin.md | 6 +++--- .../shared/workspace/buildable-and-publishable-libraries.md | 2 +- docs/shared/workspace/grouping-libraries.md | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/generated/packages/linter.json b/docs/generated/packages/linter.json index 2ce6906334..118d62e6d2 100644 --- a/docs/generated/packages/linter.json +++ b/docs/generated/packages/linter.json @@ -10,7 +10,7 @@ "name": "Overview", "path": "/packages/linter", "file": "shared/linter-plugin", - "content": "The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.\n\n## Setting Up Linter\n\n### Installation\n\nIn any Nx workspace, you can install `@nrwl/linter` by running the following commands if `@nrwl/linter` package is not installed:\n\n```bash\nnpm i --save-dev @nrwl/linter\n```\n\n```bash\nyarn add --dev @nrwl/linter\n```\n\n## Lint\n\nYou can lint an application or a library with the following command:\n\n```bash\nnx lint my-app\n```\n\n```bash\nnx lint my-lib\n```\n\n## Utils\n\n- [convert-tslint-to-eslint](/angular/convert-tslint-to-eslint) - Converts a project linter from [TSLint](https://palantir.github.io/tslint/) to [ESLint](https://eslint.org/)\n" + "content": "The Linter plugin contains executors, generator, plugin and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.\n\n## Setting Up Linter\n\n### Installation\n\nIn any Nx workspace, you can install `@nrwl/linter` by running the following commands if `@nrwl/linter` package is not installed:\n\n```bash\nnpm i --save-dev @nrwl/linter\n```\n\n```bash\nyarn add --dev @nrwl/linter\n```\n\n## Lint\n\nYou can lint an application or a library with the following command:\n\n```bash\nnx lint my-app\n```\n\n```bash\nnx lint my-lib\n```\n\n## Utils\n\n- [convert-tslint-to-eslint](/packages/angular/generators/convert-tslint-to-eslint) - Converts a project linter from [TSLint](https://palantir.github.io/tslint/) to [ESLint](https://eslint.org/)\n" }, { "id": "eslint-plugin-nx", diff --git a/docs/generated/packages/web.json b/docs/generated/packages/web.json index 945e153ad1..59f8392094 100644 --- a/docs/generated/packages/web.json +++ b/docs/generated/packages/web.json @@ -10,7 +10,7 @@ "id": "overview", "path": "/packages/web", "file": "shared/web-plugin", - "content": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n- Scaffolding for creating buildable libraries that can be published to npm.\n- Utilities for automatic workspace refactoring.\n\n## Setting Up Web\n\nTo create a new workspace with web, run `npx create-nx-workspace@latest --preset=web`.\n\nTo add the web plugin to an existing workspace, run one of the following:\n\n```bash\n# For npm users\nnpm install -D @nrwl/web\n\n# For yarn users\nyarn add -D @nrwl/web\n```\n\n### Creating Applications\n\nYou can add a new application with the following:\n\n```bash\nnx g @nrwl/web:app my-new-app\n```\n\nThe application uses no framework and generates with web components. You can add any framework you want on top of the default setup.\n\nTo start the application in development mode, run `nx serve my-new-app`.\n\n**Note:** If you are looking to add a React application, check out the [React plugin](/react/overview).\n\n### Creating Libraries\n\nTo create a generic TypeScript library (i.e. non-framework specific), use the [`@nrwl/js`](/js/overview) plugin.\n\n```bash\nnx g @nrwl/js:lib my-new-lib\n\n# If you want the library to be buildable or publishable to npm\nnx g @nrwl/web:lib my-new-lib --buildable\nnx g @nrwl/web:lib my-new-lib \\\n--publishable \\\n--importPath=@myorg/my-new-lib\n```\n\n## Using Web\n\n### Testing Projects\n\nYou can run unit tests with:\n\n```bash\nnx test my-new-app\nnx test my-new-lib\n```\n\nReplace `my-new-app` with the name or your project. This command works for both applications and libraries.\n\nYou can also run E2E tests for applications:\n\n```bash\nnx e2e my-new-app-e2e\n```\n\nReplace `my-new-app-e2e` with the name or your project with `-e2e` appended.\n\n### Building Projects\n\nReact applications can be build with:\n\n```bash\nnx build my-new-app\n```\n\nAnd if you generated a library with `--buildable`, then you can build a library as well:\n\n```bash\nnx build my-new-lib\n```\n\nThe output is in the `dist` folder. You can customize the output folder by setting `outputPath` in the project's `project.json` file.\n\nThe application in `dist` is deployable, and you can try it out locally with:\n\n```bash\nnpx http-server dist/apps/my-new-app\n```\n\nThe library in `dist` is publishable to npm or a private registry.\n\n## More Documentation\n\n- [Using Cypress](/cypress/overview)\n- [Using Jest](/cypress/overview)\n" + "content": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n- Scaffolding for creating buildable libraries that can be published to npm.\n- Utilities for automatic workspace refactoring.\n\n## Setting Up Web\n\nTo create a new workspace with web, run `npx create-nx-workspace@latest --preset=web`.\n\nTo add the web plugin to an existing workspace, run one of the following:\n\n```bash\n# For npm users\nnpm install -D @nrwl/web\n\n# For yarn users\nyarn add -D @nrwl/web\n```\n\n### Creating Applications\n\nYou can add a new application with the following:\n\n```bash\nnx g @nrwl/web:app my-new-app\n```\n\nThe application uses no framework and generates with web components. You can add any framework you want on top of the default setup.\n\nTo start the application in development mode, run `nx serve my-new-app`.\n\n**Note:** If you are looking to add a React application, check out the [React plugin](/packages/react).\n\n### Creating Libraries\n\nTo create a generic TypeScript library (i.e. non-framework specific), use the [`@nrwl/js`](/js/overview) plugin.\n\n```bash\nnx g @nrwl/js:lib my-new-lib\n\n# If you want the library to be buildable or publishable to npm\nnx g @nrwl/web:lib my-new-lib --buildable\nnx g @nrwl/web:lib my-new-lib \\\n--publishable \\\n--importPath=@myorg/my-new-lib\n```\n\n## Using Web\n\n### Testing Projects\n\nYou can run unit tests with:\n\n```bash\nnx test my-new-app\nnx test my-new-lib\n```\n\nReplace `my-new-app` with the name or your project. This command works for both applications and libraries.\n\nYou can also run E2E tests for applications:\n\n```bash\nnx e2e my-new-app-e2e\n```\n\nReplace `my-new-app-e2e` with the name or your project with `-e2e` appended.\n\n### Building Projects\n\nReact applications can be build with:\n\n```bash\nnx build my-new-app\n```\n\nAnd if you generated a library with `--buildable`, then you can build a library as well:\n\n```bash\nnx build my-new-lib\n```\n\nThe output is in the `dist` folder. You can customize the output folder by setting `outputPath` in the project's `project.json` file.\n\nThe application in `dist` is deployable, and you can try it out locally with:\n\n```bash\nnpx http-server dist/apps/my-new-app\n```\n\nThe library in `dist` is publishable to npm or a private registry.\n\n## More Documentation\n\n- [Using Cypress](/packages/cypress)\n- [Using Jest](/packages/jest)\n" } ], "generators": [ diff --git a/docs/shared/getting-started/nx-and-angular.md b/docs/shared/getting-started/nx-and-angular.md index a44b8ed143..0023c06d33 100644 --- a/docs/shared/getting-started/nx-and-angular.md +++ b/docs/shared/getting-started/nx-and-angular.md @@ -17,9 +17,9 @@ It is also a good idea to read the [mental model guide](/using-nx/mental-model) ## Nx and Angular Plugins -Nx plugins helps you develop [Angular](/angular/overview) applications with fully integrated support for +Nx plugins helps you develop [Angular](/packages/angular) applications with fully integrated support for modern tools and libraries like [Jest](/jest/overview), [Cypress](/cypress/overview), -[ESLint](/linter/eslint), Storybook, [NgRx](/angular/guides/misc-ngrx) and more. +[ESLint](/linter/eslint), [Storybook](/packages/storybook), [NgRx](/guides/misc-ngrx) and more. diff --git a/docs/shared/getting-started/nx-and-react.md b/docs/shared/getting-started/nx-and-react.md index 8c0781fc7d..1c6755f223 100644 --- a/docs/shared/getting-started/nx-and-react.md +++ b/docs/shared/getting-started/nx-and-react.md @@ -16,9 +16,9 @@ It is also a good idea to read the [mental model guide](/using-nx/mental-model) ## Nx and React Plugins -Nx plugins help you develop [React](/react/overview) applications with fully integrated support for modern tools +Nx plugins help you develop [React](/packages/react) applications with fully integrated support for modern tools and libraries like [Jest](/jest/overview), [Cypress](/cypress/overview), -Storybook, [ESLint](/linter/eslint), and more. Nx also supports React +[Storybook](/packages/storybook), [ESLint](/linter/eslint), and more. Nx also supports React frameworks like [Next.js](/next/overview), Remix, and has great support for [React Native](/react-native/overview). diff --git a/docs/shared/guides/misc-ngrx.md b/docs/shared/guides/misc-ngrx.md index d858982991..c65f1927a5 100644 --- a/docs/shared/guides/misc-ngrx.md +++ b/docs/shared/guides/misc-ngrx.md @@ -35,7 +35,7 @@ The most common additional options are: - `syntax` - NgRx introduced new creator functions for actions, reducers, and effects that provide the same type-safety with less code than action classes. - `facade` - Optional. If you prefer to further encapsulate NgRx from your components, add an injectable facade. See the blog [Better State Management with Facades](https://blog.nrwl.io/nrwl-nx-6-2-angular-6-1-and-better-state-management-e139da2cd074#cb93) for details. -See the [API Docs](/angular/ngrx) for detailed descriptions of all the available options. Also visit the [NgRx](https://ngrx.io) website for more guides and documentation about the libraries. +See the [API Docs](/packages/angular/generators/ngrx) for detailed descriptions of all the available options. Also visit the [NgRx](https://ngrx.io) website for more guides and documentation about the libraries. --- diff --git a/docs/shared/guides/using-tailwind-css-with-angular-projects.md b/docs/shared/guides/using-tailwind-css-with-angular-projects.md index e535f201b6..c2c4e598ca 100644 --- a/docs/shared/guides/using-tailwind-css-with-angular-projects.md +++ b/docs/shared/guides/using-tailwind-css-with-angular-projects.md @@ -98,7 +98,7 @@ To add Tailwind CSS to an existing Angular application, buildable library or pub npx nx g @nrwl/angular:setup-tailwind my-project ``` -You can see the available options for the above generator in [its docs](/angular/setup-tailwind). +You can see the available options for the above generator in [its docs](/packages/angular/generators/setup-tailwind). ## Tailwind CSS setup scenarios diff --git a/docs/shared/linter-plugin.md b/docs/shared/linter-plugin.md index 7b0bcc2a48..e3c8dfe69c 100644 --- a/docs/shared/linter-plugin.md +++ b/docs/shared/linter-plugin.md @@ -28,4 +28,4 @@ nx lint my-lib ## Utils -- [convert-tslint-to-eslint](/angular/convert-tslint-to-eslint) - Converts a project linter from [TSLint](https://palantir.github.io/tslint/) to [ESLint](https://eslint.org/) +- [convert-tslint-to-eslint](/packages/angular/generators/convert-tslint-to-eslint) - Converts a project linter from [TSLint](https://palantir.github.io/tslint/) to [ESLint](https://eslint.org/) diff --git a/docs/shared/migration/manual.md b/docs/shared/migration/manual.md index ab9839f226..58782e8b18 100644 --- a/docs/shared/migration/manual.md +++ b/docs/shared/migration/manual.md @@ -57,8 +57,8 @@ nx generate @nrwl/react:application my-application There are a lot of options when creating your application. If you want to follow Nx recommendations, you can accept the defaults. If you have a well-established codebase, you can configure those options at the time of application generation. You can find documentation for these options for the different frameworks here: -- [Angular](/angular/application) -- [React](/react/application) +- [Angular](/packages/angular/generators/application) +- [React](/packages/react/generators/application) You may also find it useful to use the [Nx Console](/using-nx/console) in Visual Studio Code. This will give you a visual way to generate your application with all of the options laid out in front of you. diff --git a/docs/shared/node-tutorial/01-create-application.md b/docs/shared/node-tutorial/01-create-application.md index bf4602f841..29286db958 100644 --- a/docs/shared/node-tutorial/01-create-application.md +++ b/docs/shared/node-tutorial/01-create-application.md @@ -115,7 +115,7 @@ Options: --help Show available options for project target. ``` -It helps with good editor integration (see [VSCode Support](https://nx.dev/l/node/using-nx/console#nx-console-for-vscode)). +It helps with good editor integration (see [VSCode Support](/using-nx/console#nx-console-for-vscode)). But, most importantly, it provides a holistic dev experience regardless of the tools used, and enables advanced build features like distributed computation caching and distributed builds). diff --git a/docs/shared/web-plugin.md b/docs/shared/web-plugin.md index beaebf2e1c..c1be0c531a 100644 --- a/docs/shared/web-plugin.md +++ b/docs/shared/web-plugin.md @@ -30,7 +30,7 @@ The application uses no framework and generates with web components. You can add To start the application in development mode, run `nx serve my-new-app`. -**Note:** If you are looking to add a React application, check out the [React plugin](/react/overview). +**Note:** If you are looking to add a React application, check out the [React plugin](/packages/react). ### Creating Libraries @@ -93,5 +93,5 @@ The library in `dist` is publishable to npm or a private registry. ## More Documentation -- [Using Cypress](/cypress/overview) -- [Using Jest](/cypress/overview) +- [Using Cypress](/packages/cypress) +- [Using Jest](/packages/jest) diff --git a/docs/shared/workspace/buildable-and-publishable-libraries.md b/docs/shared/workspace/buildable-and-publishable-libraries.md index b52aa2695c..fb981a0f51 100644 --- a/docs/shared/workspace/buildable-and-publishable-libraries.md +++ b/docs/shared/workspace/buildable-and-publishable-libraries.md @@ -19,7 +19,7 @@ One typical scenario for this may be that you use Nx to develop your organizatio A normal Nx library - let’s call it "workspace library" - is not made for building or publishing. Rather it only includes common lint and test targets in its `project.json` file. These libraries are directly referenced from one of the monorepo’s applications and built together with them. -Keep in mind that the `--publishable` flag does not enable automatic publishing. Rather it adds to your Nx workspace library a builder target that **compiles** and **bundles** your app. The resulting artifact will be ready to be published to some registry (e.g. [npm](https://npmjs.com/)). By having that builder, you can invoke the build via a command like: `nx build mylib` (where "mylib" is the name of the lib) which will then produce an optimized bundle in the `dist/mylib` folder. Nx [also analyzes](/angular/package#updatebuildableprojectdepsinpackagejson) the library’s dependencies and automatically compiles the dependencies in the resulting `package.json` file. +Keep in mind that the `--publishable` flag does not enable automatic publishing. Rather it adds to your Nx workspace library a builder target that **compiles** and **bundles** your app. The resulting artifact will be ready to be published to some registry (e.g. [npm](https://npmjs.com/)). By having that builder, you can invoke the build via a command like: `nx build mylib` (where "mylib" is the name of the lib) which will then produce an optimized bundle in the `dist/mylib` folder. Nx [also analyzes](/packages/angular/executors/package#updatebuildableprojectdepsinpackagejson) the library’s dependencies and automatically compiles the dependencies in the resulting `package.json` file. One particularity when generating a library with `--publishable` is that it requires you to also provide an `--importPath`. Your import path is the actual scope of your distributable package (e.g.: `@myorg/mylib`) - which needs to be a [valid npm package name](https://docs.npmjs.com/files/package.json#name). diff --git a/docs/shared/workspace/grouping-libraries.md b/docs/shared/workspace/grouping-libraries.md index be5fc4fed8..f153fe0d48 100644 --- a/docs/shared/workspace/grouping-libraries.md +++ b/docs/shared/workspace/grouping-libraries.md @@ -12,7 +12,7 @@ For instance, if a library under the `booking` folder is now being shared by mul nx g move --project booking-some-library shared/some-library ``` -> **Note**: For Angular projects, you should use the [`@nrwl/angular:move` generator](/angular/move) instead. +> **Note**: For Angular projects, you should use the [`@nrwl/angular:move` generator](/packages/angular/generators/move) instead. ## Remove Generator