- Update artifact generator schemas: - Clarify `path` is the artifact file path relative to the current working directory - Clarify `name` is the artifact symbol name - Remove prompt for `name` and remove it from the important options (won't be displayed by default in Nx Console generation UI, it will be part of the collapsed options) given that most of the time, it's meant to match the filename (last segment of the `path`) - Remove some leftover options related to the name and path formats that were previously missed - Fix an issue with NestJS generators - Fix an issue with Next `page` generator <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- 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 #
904 B
904 B
Examples
{% tabs %} {% tab label="Simple Library" %}
Creates the my-ui-lib library with an ui tag:
nx g @nx/angular:library libs/my-ui-lib --tags=ui
{% /tab %}
{% tab label="Publishable Library" %}
Creates the my-lib library that can be built producing an output following the Angular Package Format (APF) to be distributed as an NPM package:
nx g @nx/angular:library libs/my-lib --publishable --import-path=@my-org/my-lib
{% /tab %}
{% tab label="Buildable Library" %}
Creates the my-lib library with support for incremental builds:
nx g @nx/angular:library libs/my-lib --buildable
{% /tab %}
{% tab label="Nested Folder & Import"%}
Creates the my-lib library in the nested directory and sets the import path to @myorg/nested/my-lib:
nx g @nx/angular:library libs/nested/my-lib --importPath=@myorg/nested/my-lib
{% /tab %}