Skip to content

Commit

Permalink
feat(core): clean up show project --json false
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed May 22, 2024
1 parent c412bf2 commit a2ec7d0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/nx/src/command-line/show/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ export async function showProjectHandler(
if (targets.length > 0) {
console.log(`${chalk.bold('Targets')}: `);
for (const [target, targetConfig] of targets) {
const executorCommandText =
targetConfig.metadata?.runCommand ??
targetConfig?.options?.command ??
(targetConfig?.options?.commands?.length === 1
? targetConfig.options.commands[0]
: targetConfig?.executor) ??
'';
console.log(
`- ${chalk.bold((target + ':').padEnd(maxTargetNameLength + 2))} ${(
targetConfig?.executor ?? ''
).padEnd(maxExecutorNameLength + 2)} ${(() => {
`- ${chalk.bold(
(target + ':').padEnd(maxTargetNameLength + 2)
)} ${executorCommandText.padEnd(maxExecutorNameLength + 2)} ${(() => {
const configurations = Object.keys(
targetConfig.configurations ?? {}
);
Expand Down

0 comments on commit a2ec7d0

Please sign in to comment.