Skip to content

Commit

Permalink
use --dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 1, 2024
1 parent 6ac6c68 commit f31ce74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/generators/pm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const INSTALL_COMMANDS = [
["yarn", "add"],
["pnpm", "install"],
["bun", "install"],
["deno", "install"],
["deno", "install", "--dev"],
] as const;

const NYPM_COMMAND = ["npx nypm", "install"] as const;
Expand Down Expand Up @@ -42,8 +42,8 @@ export const pmInstall = defineGenerator({
: [NYPM_COMMAND, ...INSTALL_COMMANDS];

const contents = commands.map(
([cmd, install]) =>
`# ${cmd.includes("nypm") ? "✨ Auto-detect" : cmd}\n${cmd} ${install}${args.dev ? " -D" : ""} ${name}${versionSuffix}`,
([cmd, install, dev = " -D"]) =>
`# ${cmd.includes("nypm") ? "✨ Auto-detect" : cmd}\n${cmd} ${install}${args.dev ? dev : ""} ${name}${versionSuffix}`,
);

if ((args.separate ?? false) === false) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/OUTPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bun install -D automd

```sh
# deno
deno install -D automd
deno install--dev automd
```

<!-- /automd -->
Expand Down

0 comments on commit f31ce74

Please sign in to comment.