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

feat(core): add --help content to project details view #26629

Merged
merged 12 commits into from
Jun 27, 2024

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Jun 21, 2024

This PR adds help text for each inferred target that provides metadata.help.command. To pass options/args to the target, users are directed to open project.json and copy the values from --help output into options property of the target.

To display the options help section, the inferred target must provide metadata as follows:

 metadata: {
      help: {
        command: `foo --help`
        example: {
          options: {
            bar: true
          },
        },
      },
    },

The help.command value will be used to retrieve help text for the underlying CLI (e.g. jest --help). The help.example property contains sample options and args that users can add to their project.json file -- currently rendered in the hover tooltip of project.json hint text.


Example with vite build --help:

Screenshot 2024-06-21 at 3 06 21 PM

Result of clicking Run:
Screenshot 2024-06-21 at 3 06 24 PM

project.json tooltip hint:
Screenshot 2024-06-25 at 12 44 02 PM

Copy link

vercel bot commented Jun 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jun 27, 2024 3:38pm

@jaysoo jaysoo force-pushed the feat/pdv-show-help branch from 83a1026 to 74bd076 Compare June 26, 2024 14:59
@jaysoo jaysoo force-pushed the feat/pdv-show-help branch from 6179eda to ae2df1b Compare June 26, 2024 16:11
@jaysoo jaysoo requested a review from vsavkin as a code owner June 26, 2024 16:11
@jaysoo jaysoo force-pushed the feat/pdv-show-help branch 4 times, most recently from c538eae to 8c0f15a Compare June 26, 2024 16:51
@jaysoo jaysoo force-pushed the feat/pdv-show-help branch from 8c0f15a to 12e4ede Compare June 27, 2024 14:01
@jaysoo jaysoo requested a review from FrozenPandaz June 27, 2024 14:07
@jaysoo jaysoo force-pushed the feat/pdv-show-help branch from 12e4ede to dc5e10a Compare June 27, 2024 14:50
@jaysoo jaysoo force-pushed the feat/pdv-show-help branch from dc5e10a to 1a42ddd Compare June 27, 2024 15:31
@FrozenPandaz FrozenPandaz merged commit d90a735 into master Jun 27, 2024
6 checks passed
@FrozenPandaz FrozenPandaz deleted the feat/pdv-show-help branch June 27, 2024 17:33
Copy link

github-actions bot commented Jul 6, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 6, 2024
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.

6 participants