Skip to content

Commit

Permalink
cleanup(misc): reword prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Aug 10, 2023
1 parent 5bf6493 commit 8d98e32
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,18 @@ describe('determineProjectNamesAndDirectories', () => {
type: 'select',
name: 'format',
message:
'What project name and directory format would you like to use?',
'What should be the project name and where should it be generated?',
choices: [
{
message: 'lib-name @ shared (recommended)',
message: `Recommended:
Name: lib-name
Root: shared`,
name: 'as-provided',
},
{
message: 'shared-lib-name @ shared/lib-name (legacy)',
message: `Legacy:
Name: shared-lib-name
Root: shared/lib-name`,
name: 'derived',
},
],
Expand Down Expand Up @@ -524,14 +528,18 @@ describe('determineProjectNamesAndDirectories', () => {
type: 'select',
name: 'format',
message:
'What project name and directory format would you like to use?',
'What should be the project name and where should it be generated?',
choices: [
{
message: 'lib-name @ shared (recommended)',
message: `Recommended:
Name: lib-name
Root: shared`,
name: 'as-provided',
},
{
message: 'shared-lib-name @ libs/shared/lib-name (legacy)',
message: `Legacy:
Name: shared-lib-name
Root: libs/shared/lib-name`,
name: 'derived',
},
],
Expand Down
15 changes: 11 additions & 4 deletions packages/devkit/src/generators/project-name-directory-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ async function determineFormat(
return await prompt<{ format: ProjectNameDirectoryFormat }>({
type: 'select',
name: 'format',
message: 'What project name and directory format would you like to use?',
message:
'What should be the project name and where should it be generated?',
choices: [
{
message: formats['as-provided'].description,
Expand Down Expand Up @@ -149,7 +150,9 @@ function getProjectNameDirectoryFormats(
const nameWithoutScope = asProvidedProjectName.split('/')[1];
return {
'as-provided': {
description: `${asProvidedProjectName} @ ${asProvidedProjectDirectory} (recommended)`,
description: `Recommended:
Name: ${asProvidedProjectName}
Root: ${asProvidedProjectDirectory}`,
options: {
projectName: asProvidedProjectName,
names: {
Expand Down Expand Up @@ -215,7 +218,9 @@ function getProjectNameDirectoryFormats(

return {
'as-provided': {
description: `${asProvidedProjectName} @ ${asProvidedProjectDirectory} (recommended)`,
description: `Recommended:
Name: ${asProvidedProjectName}
Root: ${asProvidedProjectDirectory}`,
options: {
projectName: asProvidedProjectName,
names: {
Expand All @@ -227,7 +232,9 @@ function getProjectNameDirectoryFormats(
},
},
derived: {
description: `${derivedProjectName} @ ${derivedProjectDirectory} (legacy)`,
description: `Legacy:
Name: ${derivedProjectName}
Root: ${derivedProjectDirectory}`,
options: {
projectName: derivedProjectName,
names: {
Expand Down

0 comments on commit 8d98e32

Please sign in to comment.