Skip to content

Library secondary entry-point generation #19070

@klemenoslaj

Description

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

Creating a secondary entry points for libraries is a manual effort with a risk of misconfiguration of unit testing environment.
In order to get a proper coverage report for all the libraries, the following needs to be adjusted:

  • in test.ts the context path should be changed: const context = require.context('../', true, /\.spec\.ts$/);
  • in angular.json the sourceRoot path should be changed: "sourceRoot": "projects/lib-name", (no /src)

Describe the solution you'd like

Create a schematic that generates the secondary entry point for the given library.


I would be happy to provide a PR if this get's greenlit.

Metadata

Assignees

No one assigned

    Labels

    area: @schematics/angularfeatureIssue that requests a new featurefeature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions