15 Commits

Author SHA1 Message Date
Jack Hsu
8fa7065cf1
docs(misc): update generator examples to use new directory/path positional args (#28144)
This PR updates examples in `.md` files (both docs and blog posts) to
use positional args. Nx 20 changes the position arg to be either
`directory` for apps/libs or `path` for artifacts (e.g. components).

So before you'd do this:

```
nx g app myapp --directory=apps/myapp
nx g lib mylib --directory=libs/mylib
nx g lib mylib --directory=libs/nested/mylib
nx g lib @acme/foo --directory=libs/@acme/foo --importPath=@acme/foo
nx g component foo --directory=libs/ui/src/foo --pascalCaseFiles
```

Will now be simplified to

```
nx g app apps/myapp
nx g lib libs/mylib
nx g lib libs/nested/mylib
nx g lib libs/@acme/foo # name and import path are both "@acme/foo"
nx g component libs/ui/src/foo/Foo
```

For cases where `name` and `importPath` need to be changed, you can
always manually specify them.

```
nx g lib libs/nested/foo # name is foo
nx g lib libs/nested/foo --name=nested-foo # specify name with prefix
nx g lib libs/@acme/foo --name # use "foo" as name and don't match importPath
nx g lib libs/@internal/foo --importPath=@acme/foo # different importPath from name

<!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR -->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is merged. -->

Fixes #
2024-09-30 13:20:10 -04:00
Craigory Coppola
da4fb5a9a5
docs(core): add quiet flag to generate docs (#21378) 2024-02-22 15:55:23 -05:00
Isaac Mann
afa5eb59fa
docs(core): document the @nrwl => @nx rescope (#16403)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-04-27 18:14:59 -04:00
Doni Rubiagatra
3c0b0ec3c4
docs(core): fix duplicate generate description for dryRun (#13759)
Fixes https://github.com/nrwl/nx/issues/12196
2022-12-12 13:51:48 -05:00
Benjamin Cabanes
1e5297edfc
docs(core): use shell code blocks (#12587) 2022-10-13 21:25:40 +00:00
Isaac Mann
e717660102
docs(nx-dev): diataxis restructure (#11649)
* docs(nxdev): restructure docs to diataxis style

* docs(nxdev): cleanup

* docs(nxdev): fix links

* chore(nxdev): format

* docs(nxdev): fix broken images

* docs(nxdev): fix links

* docs(nxdev): fix links

* docs(nxdev): fix links

* docs(nxdev): tweaks

* docs(nxdev): redirect rules

* docs(nxdev): fixes
2022-08-29 08:36:55 -04:00
Benjamin Cabanes
0fea1c8cca
docs(nxdev): remove flavour and versions patterns from docs (#8416) 2022-01-06 20:09:01 +00:00
Benjamin Cabanes
ea0d65b019
docs(nxdev): better api generator templates (#8109) 2021-12-10 12:18:46 -05:00
Jason Jean
85f92e740e
feat(misc): simplify npm scripts generated (#6764) 2021-08-20 12:07:26 -04:00
Isaac Mann
35015dd891 cleanup(docs): update terminology for docs related to nx/devkit 2020-12-06 13:52:08 -05:00
Victor Savkin
3cd9f4fe6c feat(misc): add nx package to make installing global cli easier 2020-07-29 12:16:12 -04:00
n0p
f51e005a8c Update generate.md
Added web component app option.
Should 'next' application added also ?

I am a bit confused by Angular application option. It is the same as new Node application ?
2020-05-21 23:45:23 -04:00
Benjamin Cabanes
be77d15e6e
docs(core): examples generating library (#2872) 2020-04-20 08:11:20 -04:00
Victor Savkin
e17fcdca0f docs(core): fix links + minor changes 2020-03-30 15:38:20 -04:00
Victor Savkin
5ab3521fdc docs(core): clean up cli docs 2020-03-25 17:22:17 -04:00