Skip to content

Commit b357d54

Browse files
committed
Update resolution logic for vp create to match npm-init
1 parent fb7cc34 commit b357d54

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/cli/src/create/__tests__/discovery.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ describe('expandCreateShorthand', () => {
6060
expect(expandCreateShorthand('/absolute/path')).toBe('/absolute/path');
6161
});
6262

63-
it('should handle scope-only input gracefully', () => {
64-
expect(expandCreateShorthand('@scope')).toBe('@scope');
63+
it('should expand scope-only input to @scope/create', () => {
64+
expect(expandCreateShorthand('@scope')).toBe('@scope/create');
6565
});
6666

6767
it('should handle special cases where default convention does not apply', () => {

packages/cli/src/create/discovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export function expandCreateShorthand(templateName: string): string {
169169
if (templateName.startsWith('@')) {
170170
const slashIndex = templateName.indexOf('/');
171171
if (slashIndex === -1) {
172-
return templateName;
172+
return `${templateName}/create`;
173173
}
174174
const scope = templateName.slice(0, slashIndex);
175175
const rest = templateName.slice(slashIndex + 1);

0 commit comments

Comments
 (0)