25 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
c92528f65d
feat(misc): remove derived generator paths (#27714)
<!-- 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 #

---------

Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
2024-09-23 09:19:42 -04:00
Leosvel Pérez Espinosa
cfa0815385
fix(angular): stop using npmScope as a prefix for component and directive selectors (#21828) 2024-02-21 16:20:12 +01: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
2883fa3a6f
feat(angular): update component generator to use a single string styles or styleUrl property (#20146) 2023-11-13 15:22:37 +01:00
Leosvel Pérez Espinosa
25d6ec3a92
feat(angular): support angular v17 (#19689) 2023-11-07 15:45:42 -05:00
Leosvel Pérez Espinosa
312351b03c
fix(angular): throw an error when generating a component and the specified module can't be found (#19324) 2023-09-25 16:09:18 -04:00
Colum Ferry
577f820158
fix(angular): style=none should not create file #18785 (#18836) 2023-08-25 11:54:57 +01:00
Colum Ferry
48b356d9c1
fix(angular): throw error when generating component with multiple candidate modules (#16332) 2023-04-19 09:46:13 +01:00
Colum Ferry
0ce1f37943
fix(angular): add component import path correctly to NgModule when flat=false (#16364) 2023-04-19 09:45:36 +01: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
29f5326b80
cleanup(angular): update component generator to be more consistent with similar generators (#16078) 2023-04-04 09:12:57 +00:00
Jason Jean
4a55ee9a33
fix(js): run prettier with default options when theres no prettierrc (#15888) 2023-03-27 18:00:24 -04: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
Colum Ferry
46b10c2e20
fix(angular): correctly error component when standalone is used in Angular < 14.1.0 (#14337) 2023-01-13 12:57:19 +00: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
4e54b1a545
fix(angular): handle not provided path when generating a component without the project option (#13877) 2022-12-19 09:49:56 -05:00
Victor Savkin
16fd4374d6 feat(misc): derive workspace layout dynamically 2022-11-23 15:45:13 -05:00
Craigory Coppola
458fc36014
chore(misc): split create tree with empty workspace to remove parameter (#10188)
* feat(devkit): split create-empty-tree to different functions

* chore(repo): apply migration for createEmptyTree

* cleanup(misc): fix tests that migration misses
2022-08-11 19:24:04 -04:00
Leosvel Pérez Espinosa
98014dd660
feat(angular): support exporting standalone component in library's entry point file (#10544) 2022-06-01 17:00:26 +01:00
Leosvel Pérez Espinosa
2b1591d85a
fix(angular): fix component export logic to handle internal modules and secondary entry points (#10517) 2022-05-31 11:09:39 +01:00
Leosvel Pérez Espinosa
5c94d6222f
fix(angular): add missing skipImport option to the component generator (#10167) 2022-05-06 08:57:20 +01:00
Colum Ferry
e42069b5ec
fix(angular): add --module option to component generator (#9684) 2022-04-05 15:37:08 +01:00
Colum Ferry
a26caaa288
feat(angular): add component generator (#9351) 2022-03-16 12:48:27 +00:00