14 Commits

Author SHA1 Message Date
Nicholas Cunningham
bc8b71ac6c
fix(core): Remove nameAndDirectoryFormat option from generators (#28110)
<!-- 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 -->

Currently, when we use generator's via the CLI passing the `name` arg
has more than one responsibility:
1.  it can be used as a path
2. it can be used as the generator's name (e.g. Component name)

This is not intuitive as if we use via Nx Console because it creates
some ambiguity around the `--name` property which is normally described
as only 2.

![image](https://github.com/user-attachments/assets/b05fa2a7-36e7-44a1-af82-6f55f53d6c43)

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

What is expected is that the `name` property should only have the
responsibility of determining the name of the generated module
(Component, Directive etc...).

The new property `path` replaces the `directory` property but fulfils
the same purpose as determining where the module should be created.

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

Fixes #

---------

Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-10-01 08:26:27 -04:00
Leosvel Pérez Espinosa
626605ef97
chore(angular): skip formatting generated code when not needed in unit tests (#20819) 2023-12-18 11:05:44 -05:00
Leosvel Pérez Espinosa
2076abfca4
fix(angular): fix usage of internal generators and prevent usage of deprecated project option (#19697) 2023-10-18 18:26:21 -04:00
Colum Ferry
5a6adb717c
feat(angular): use consistent artifact generation for generators (#19601) 2023-10-13 12:07:02 -04:00
Jason Jean
2d195007b0
feat(core): switch packages to use the @nx scope (#16069) 2023-04-14 19:56:37 -04:00
Leosvel Pérez Espinosa
a0fb3c705e
cleanup(angular): consolidate name and path normalization for component, directive and pipe generators (#16108) 2023-04-05 09:50:46 +01:00
Leosvel Pérez Espinosa
d20bf770ef
fix(angular): prevent nested calls to formatFiles in generators (#15946) 2023-03-29 09:46:51 +01:00
Colum Ferry
5ac7243d4a
cleanup(angular): use our own directive for scam-directive (#15715) 2023-03-16 16:11:32 +00:00
Leosvel Pérez Espinosa
ca8d24b3d4
fix(angular): set projectName as the default source for relevant generators (#15664) 2023-03-14 16:38:35 +00:00
Emily Xiong
032efc2cfb
fix(angular): ensure peer deps are installed when initializing the plugin (#14906)
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
2023-02-14 11:07:51 -05:00
Victor Savkin
422c8c735a cleanup(core): clearly split nx.json config and projects config 2023-01-05 15:35:36 -05:00
Leosvel Pérez Espinosa
a9e1fd06a9
fix(angular): allow generating scam directive and exporting them from secondary entrypoints (#10981) 2022-07-01 17:03:21 +01:00
Colum Ferry
a26caaa288
feat(angular): add component generator (#9351) 2022-03-16 12:48:27 +00:00
Shlomi Levi
4bb109e175
feat(angular): add scam generator for pipes and directives (#8144)
ISSUES CLOSED: #8122
2021-12-14 11:28:47 +00:00