Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library secondary entry-point generation #19070

Open
1 of 15 tasks
klemenoslaj opened this issue Oct 14, 2020 · 3 comments
Open
1 of 15 tasks

Library secondary entry-point generation #19070

klemenoslaj opened this issue Oct 14, 2020 · 3 comments
Labels
area: schematics/angular feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Milestone

Comments

@klemenoslaj
Copy link

klemenoslaj commented Oct 14, 2020

馃殌 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.

@alan-agius4 alan-agius4 added area: schematics/angular feature Issue that requests a new feature labels Oct 14, 2020
@ngbot ngbot bot added this to the Backlog milestone Oct 14, 2020
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Feb 2, 2022
@ngbot ngbot bot modified the milestones: Backlog, needsTriage Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 2, 2022

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 21, 2022
@ertunga
Copy link

ertunga commented Jul 16, 2022

I've lost so much time because of this. It always requires manual effort to set things up with secondary entry points or am I missing something? there is ambiguity around folder structure of the library, unit tests stop working, you can't get the desired import path you want when you are consuming the library... I think nx has some generators to help develop libraries with second entry points, something like that can be added to CLI as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: schematics/angular feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

3 participants