Skip to content

Commit 71ba4c2

Browse files
committed
fix: Deno command for create- packages
1 parent 2af4011 commit 71ba4c2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/utils/install-command.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const packageManagers = [
4747
action: 'add',
4848
executeLocal: 'deno run',
4949
executeRemote: 'deno run',
50-
create: 'deno run',
50+
create: 'deno create',
5151
icon: 'i-simple-icons:deno',
5252
},
5353
{
@@ -137,6 +137,9 @@ export function getExecuteCommandParts(options: ExecuteCommandOptions): string[]
137137
if (options.isCreatePackage) {
138138
const shortName = getCreateShortName(options.packageName)
139139
if (shortName !== options.packageName) {
140+
if (options.packageManager === 'deno') {
141+
return ['deno', 'create', `npm:${shortName}`]
142+
}
140143
return [...pm.create.split(' '), shortName]
141144
}
142145
}

test/unit/app/utils/install-command.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ describe('install command generation', () => {
381381
['pnpm', ['pnpm', 'create', 'vite']],
382382
['yarn', ['yarn', 'create', 'vite']],
383383
['bun', ['bun', 'create', 'vite']],
384-
['deno', ['deno', 'run', 'vite']],
384+
['deno', ['deno', 'create', 'npm:vite']],
385385
['vlt', ['vlx', 'vite']],
386386
] as const)('%s → %s', (pm, expected) => {
387387
expect(

0 commit comments

Comments
 (0)