Skip to content

Make @ character removal optional when generating scoped libraries #19439

Closed
@elsasslegend

Description

@elsasslegend

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

While running ng generate library with a scoped package, let's say @ui/mylib, the generated folder is ui/mylib.
An explanation for this behavior was given here : #646
Unfortunately this breaks the behavior of much monorepo tools like lerna or oao. In a big project, you'll have several libraries that have dependencies on other ones in the same monorepo. To rebuild them all in order, you'll want to automatize launching ng build task on each library, by respecting the dependency graph (starting by the leaves).
Tools like lerna can do this, but will fail when looking at a folder that has the same name as the dependency in the package.json => @ui/mylib
Therefore these tools become unusable.

Describe the solution you'd like

Make optional the removal of "@" character in the folder name, using a setting in angular.json for example ?

Describe alternatives you've considered

No workaround found yet, unless I would consider redevelop a graph building system like lerna, just because of this folder glitch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions