Skip to content

feat(@angular/cli): build only the projects of a certain type #10397

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

nweldev
Copy link
Contributor

@nweldev nweldev commented Apr 19, 2018

Goal feature

Permit to run some architect commands only on projects with a specific projectType.

For example, this will only build the libraries :

ng build --project-type=library

angular/devkit#739 would be needed for filtering project names.

Purpose

Applications and libraries doesn't share the same use-cases : where applications are built (thanks to the build-angular build architect) in order to be served through HTTP, libraries, on the other hand, are bundled by ng-packagr in order to be published to a npm repository. Therefore, deployment / publication processes diverged between the two, so is the CI.

This PR is also a first example of angular/devkit#739 use.

@nweldev nweldev changed the title feat(@angular/cli): build only the projects of a certain type WIP feat(@angular/cli): build only the projects of a certain type Apr 20, 2018
@filipesilva
Copy link
Contributor

Heya @noelmace I talked a bit about this problem in angular/devkit#730 (comment), and at the end of my comment I mention this PR and why I think it is not the right approach to this problem at the moment. Let me know what you think.

@nweldev
Copy link
Contributor Author

nweldev commented Apr 27, 2018

@filipesilva Thanks for this feedback. We continued to speak (a lot) about this in #730, and I think I see now how we could proceed. Please, see if you can add some feedbacks on angular/devkit#730 (comment).

On the other hand, I still think this option could be relevant for a more restricted use case : we have some set on libraries as a whole, like @angular/*. So, we have to build all of them at the same time, but without building our apps. For that, we can only add some dumb script that just run ng build --project liba && ng build --project libb && .... (see angular/devkit#730 (comment) or https://github.com/noelmace/ng-admin/blob/master/scripts/publish.ts#L25 for some more sofisticated approach).

For my use case especially, we could also add a --scope option which would permit to just run build targets for projects of a given npm scope / projects/ sub-folder. If you think this would be a good feature to add, I could make a PR quickly, but this would require angular/devkit#739. Could you take a look at it please ? Thanks.

This commit is just a first example for angular#10369, following the discussion started in
angular/devkit#730.
angular/devkit#739 would be needed.
This example would also require some evolutions on @angular-devkit/architect, but I'm
sure there is a way to do this.
@nweldev nweldev force-pushed the filter-projects branch from 0c5e52d to 150d8bf Compare May 9, 2018 14:18
@nweldev nweldev changed the title WIP feat(@angular/cli): build only the projects of a certain type feat(@angular/cli): build only the projects of a certain type May 9, 2018
@filipesilva filipesilva added the needs: discussion On the agenda for team meeting to determine next steps label May 21, 2018
@filipesilva filipesilva self-assigned this May 24, 2018
@filipesilva filipesilva removed the needs: discussion On the agenda for team meeting to determine next steps label May 24, 2018
@filipesilva
Copy link
Contributor

Heya I brought this up with the team and we don't want to do it via filtering through project type. We feel it is a fairly limited way of doing this.

The need for this sort of thing is still there in the cases you mentioned. I have made #11002 to track this. There's other parties with similar needs and we hope to converge on a design that satisfies them.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants