Add Deno to the package-manager options#682
Open
bartlomieju wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👋 Bartek from the Deno team here.
This adds Deno as a fifth option to the package-manager widgets, alongside npm / yarn / pnpm / bun. Since the tabs are generated by your shared
<Npm>/<Npx>/<NpxCompact>components, Deno now appears on every install/exec snippet across the docs, e.g. on the get-started pages:A few notes on the choices:
deno addto match the surroundingyarn add/pnpm add/bun addstyle. Deno is a drop-in replacement for npm these days, sodeno add drizzle-ormworks the same way as the others (reads/writespackage.json).deno x(Deno'snpx/bunxequivalent), e.g.deno x drizzle-kit generate.packageManagersarrays inDocsLayout/CenteredLayout, so picking the Deno tab persists across widgets like the existing options do.<select>width-resizer now measures the selected option's text instead of the short package-manager name.I verified locally with
pnpm astro check(0 errors) and by checking the rendered tabs/commands on the get-started pages.One thing worth flagging: the exec widget prefixes commands generically, so the "run your code" step renders
deno x tsx src/index.ts. That works, though on Deno you can run TypeScript directly (deno run -A src/index.ts) withouttsx. Happy to special-case that step if you'd prefer.Totally fine to close this if you'd rather not add another tab. Happy to adjust anything.
Disclosure: I work on Deno, so I have an interest here. The goal is parity with the package managers you already list, not promotion. This PR was prepared with AI assistance under human supervision: I review every change myself and personally respond to any comments or review feedback.