Skip to content

[Other]: Add a PackageManager component #1018

Closed
@amirhhashemi

Description

@amirhhashemi

📋 Explain your issue

There are a lot of package-manager related instructions in the docs. For example, when a package needs to be installed we add tab like this:

image

The documentation for these is written manually, which results in a significant amount of boilerplate and inconsistency. For example, some sections do not include instructions for Deno or Bun, or both. Additionally, some parts instruct users to use pnpm add while others suggest pnpm install for installing packages with Pnpm.

Moreover, there is a lot of room for error due to wired Prettier behaviors.

I propose adding a component called PackageManager (or a similar name) that renders a tab with instructions for each package manager we want to support. The API could look like this:

<PackageManager command="install" args={["@solidjs/router", "@solidjs/meta"]} />
<PackageManager command="run" args={["dev"]} />

This approach ensures consistency and minimizes repetitive code.

Feel free to assign this to me if you’d like.

Metadata

Metadata

Assignees

Labels

plannedFeatures or content that are planned but not yet in progress.site improvementSomething that improves the website functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions