Skip to content

Commit

Permalink
Merge pull request #1105 from bryceosterhaus/master
Browse files Browse the repository at this point in the history
feat(@liferay/cli): add a way to specify what version of dxp that the target project is supported
  • Loading branch information
bryceosterhaus authored Mar 17, 2023
2 parents 082c1c2 + 40d59db commit 28b2afd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion projects/js-toolkit/packages/liferay-cli/src/new/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface Facet {
}

export interface Target extends Facet {
dxpSupport?: string;
name: string;
}

Expand Down Expand Up @@ -88,7 +89,14 @@ export default async function newProject(
else {
options = await prompt(batch, options, [
{
choices: targets.map((target) => target.name),
choices: targets.map((target) => ({
name: `${target.name} ${
target.dxpSupport
? `(Support: ${target.dxpSupport})`
: ''
}`,
value: target.name,
})),
default: targets[0].name,
message: 'What type of project do you want to create?',
name: 'target',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const TARGET_ID = 'target-theme-spritemap';
const platforms = dependencies[TARGET_ID]['platforms'];

const target: Target = {
name: 'Liferay Theme Spritemap Client Extension (Experimental)',
dxpSupport: 'experimental',
name: 'Liferay Theme Spritemap Client Extension',

async prompt(useDefaults: boolean, options: Options): Promise<Options> {
options = await facetProject.prompt(useDefaults, options);
Expand Down

0 comments on commit 28b2afd

Please sign in to comment.