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

Already on GitHub? Sign in to your account

Make affected:libs:build command #2671

Closed
wickstargazer opened this issue Mar 15, 2020 · 5 comments
Closed

Make affected:libs:build command #2671

wickstargazer opened this issue Mar 15, 2020 · 5 comments

Comments

@wickstargazer
Copy link

Expected Behavior

I would like to be able to build affected libs only, not all of them or one by one.

Current Behavior

Can only view affected libs can't build them, have to use run-many as work around and hard to communicate within a large team
Any other relevant information that will help us help you.

I have created a small snippet to able the workspace to run affected:libs:build successfully re-using @nrwl/workspace libraries

link to gist --> affected-libs.ts

@vsavkin
Copy link
Member

vsavkin commented Mar 16, 2020

One workaround is to define another target build-lib for every lib, and make that target simply invoke build. The you can do:

nx affected --target=build-lib

@wickstargazer
Copy link
Author

wickstargazer commented Mar 16, 2020

ok i understand what you mean now @vsavkin after reading it in the day time and not middle of the night :/

thats good, but would be a target under a "lib" project in workspace.json only right?

I was hoping to do the copy assets as well, as some of our angular libs have assets and that can be done with Node libraries only, Or that is bad design?

@github-actions github-actions bot added the stale label May 29, 2020
@vsavkin vsavkin removed the stale label May 29, 2020
@nrwl nrwl deleted a comment from github-actions bot May 29, 2020
@github-actions
Copy link

github-actions bot commented Feb 3, 2021

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@npwork
Copy link

npwork commented Jan 12, 2022

Possible workaround

nx run-many --target=build --projects=$(nx affected:libs --plain | sed 's/ /,/g')

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants