Skip to content

List available projects in a workspace - ng projects #23482

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

Open
1 task done
dgp1130 opened this issue Jun 30, 2022 · 7 comments
Open
1 task done

List available projects in a workspace - ng projects #23482

dgp1130 opened this issue Jun 30, 2022 · 7 comments
Labels
area: @angular/cli feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature

Comments

@dgp1130
Copy link
Collaborator

dgp1130 commented Jun 30, 2022

🚀 Feature request

Command (mark with an x)

  • projects

Description

In large Angular monorepo workspaces, it can sometimes be non-obvious to discover all the available projects which can be built. We should consider a new command (ng projects, ng ls, etc.) which lists all the projects in the current workspace. This can help new developers in workspace figure out exactly what they want to work on and how to do it.

Describe alternatives you've considered

Workaround is to introspect the angular.json file, which is not obvious or easy to do, especially for a new developer.

@dgp1130 dgp1130 added feature Issue that requests a new feature area: @angular/cli labels Jun 30, 2022
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jul 1, 2022
@angular-robot

This comment was marked as resolved.

@angular-robot

This comment was marked as resolved.

@ZRktty
Copy link

ZRktty commented Aug 18, 2022

I'm joining the supporters of this feature request!

In my case, I have a workspace with multiple projects and it is time-consuming to write the --project="" argument after the command, and don't want to create a separate npm script command in the packege.json for every project for every command that needs the project parameter. I have currently 2, but there will be 12 or more in the future.

Another scenario:
I thought it would be neat to have a bash script to help run the serve, build, or lint commands. The script would project by prompting the user to choose one from the list of available projects.

Currently, I plan to implement this in a separate bash script but I think this feature would be also beneficial in the CLI.

@oshliaer
Copy link

There is another workaround. It's to call Error: Invalid values: of ng serve. The output returns available projects list.

$> ng serve Z
$< Error: Invalid values:
       Argument: project, Given: "Z", Choices: "forms", "material-view-samples"

Also from v14 ng serve requires a mandatory [project] parameter

$> ng serve
$< Error: Cannot determine project for command.
       This is a multi-project workspace and more than one project supports this command.
       Run "ng serve [project]" to execute the command for a specific project or change the
       current working directory to a project directory.

    Available projects are:
    - forms
    - material-view-samples

@angular-robot

This comment was marked as resolved.

@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 Aug 29, 2022
@dgp1130 dgp1130 added feature: under consideration Feature request for which voting has completed and the request is now under consideration and removed feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors labels Nov 30, 2022
@guyettenathanj
Copy link

I would also love this feature.

@reuse-ay
Copy link

The option to specify a library or application would also be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/cli feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

5 participants