-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(angular): support generating artifacts using options as provided #19527
feat(angular): support generating artifacts using options as provided #19527
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit c75ab8c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
f1d6e12
to
765f173
Compare
765f173
to
017d13c
Compare
017d13c
to
c8e6183
Compare
c8e6183
to
4fd9e1a
Compare
packages/devkit/src/generators/artifact-name-and-directory-utils.spec.ts
Show resolved
Hide resolved
packages/devkit/src/generators/artifact-name-and-directory-utils.ts
Outdated
Show resolved
Hide resolved
4fd9e1a
to
c75ab8c
Compare
@@ -633,6 +633,8 @@ export async function combineOptionsForGenerator( | |||
schema, | |||
false | |||
); | |||
|
|||
warnDeprecations(combined, schema); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was being executed after the smart defaults were applied. That was wrong because it would warn about a deprecated option with a smart default (e.g. project
). The order of operations after this change matches the order of those in the Angular CLI.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Artifact generators (e.g.
component
) options are more complex than they should be and are not consistent across the different Nx first-party plugins. These are some of the current problems:directory
/path
option is expected to be relative to the workspace root for some generators, and for others, it’s expected to be relative to the project source root.name
,project
,directory
/path
,flat
.Apart from those, there are also some automatic decisions made by these generators, like converting the provided names to kebab-case. While this can enforce certain standards, it can be limiting and might not fit every use case.
Expected Behavior
as-provided
andderived
. In most cases, we'll prompt the user for the format they want to use.derived
format:project
flat
path
anddirectory
options name to bedirectory
. We'll keep backward compat forpath
.directory
option to be relative to the cwd.Related Issue(s)
Fixes #