Skip to content

Commit

Permalink
docs(misc): fix links not handled correctly by redirect rules (#10350)
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed May 17, 2022
1 parent 8a88b98 commit 4db6c2d
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/generated/packages/linter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/packages/web.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
4 changes: 2 additions & 2 deletions docs/shared/getting-started/nx-and-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/cXOkmOy-8dk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Expand Down
4 changes: 2 additions & 2 deletions docs/shared/getting-started/nx-and-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/sNz-4PUM0k8" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"></iframe>
Expand Down
2 changes: 1 addition & 1 deletion docs/shared/guides/misc-ngrx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/linter-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
4 changes: 2 additions & 2 deletions docs/shared/migration/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/node-tutorial/01-create-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
6 changes: 3 additions & 3 deletions docs/shared/web-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion docs/shared/workspace/grouping-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

1 comment on commit 4db6c2d

@vercel
Copy link

@vercel vercel bot commented on 4db6c2d May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev

Please sign in to comment.