-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-10222. Add pnpm guide to contributing guide. #64
Conversation
@devabhishekpal could you double check my explanations here? |
- **package.json** | ||
|
||
This file contains version guidelines for all the top level dependencies required to build the website. This file may be updated manually to adjust which versions are installed, or automatically when commands like `pnpm update` are run. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also add command aliases, metadata etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So package.json can have different information other than just the dependencies. For ex in the current website package.json we see various metadata like:
Also it has a scripts section which specifies the exact command to run for the given aliases. For example pnpm start
will run docusaurus start
.
The package manager essentially checks this scripts section and then treats these as the equivalent of aliases for a command.
This feature is helpful when you want a long command to run, say as a part of some CI build, or to ease the dev process, you can add a new command and reference the actual command you want to run - then you can call it as pnpm <new command name>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is outside the scope of what I was aiming to cover. Basically I wanted to add just enough info that people could confidently do package updates with just this guide since most are probably not familiar with pnpm. That's why I put this sentence at the beginning:
Basic knowledge required to maintain the website's dependencies is outlined here. See pnpm docs for complete usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @errose28 , thanks for this change. Great explanation for quickly getting started.
LGTM +1.
Thanks @devabhishekpal. I updated the install section based on your suggestion. |
+1 lgtm |
* HDDS-9225-website-v2: Bump docusaurus to 3.3.2 (apache#93) HDDS-10667. Improvements to spelling checks. (apache#89) HDDS-10698. Bump skywalking-eyes to v0.6.0 (apache#90) HDDS-10449. Add quick start to the top of contributing guide. (apache#83) HDDS-10351. Add GitHub Actions check for yaml formatting (apache#87) HDDS-9567. Add GitHub Actions license header check for relevant files. (apache#86) HDDS-10506. Reduce directory iterations in sidebar check (apache#85) HDDS-9866. Add GitHub Actions checks for consistent Docusaurus formatting. (apache#84) HDDS-10254. Add GitHub Actions check for Markdown style. (apache#81) HDDS-10349. Add GitHub Actions check for consistent file name formatting. (apache#79) HDDS-10426. Crop ozone-logo.svg to a proper size (apache#80) HDDS-10353. Add GitHub Actions check of all generated URLs in the sitemap. (apache#77) HDDS-9868. Add GitHub Actions check for spelling. (apache#76) HDDS-10400. Fix event condition in website publish workflow (apache#78) HDDS-10352. Add GitHub Actions workflow to build and run the website. (apache#74) HDDS-10222. Add pnpm guide to contributing guide. (apache#64) HDDS-10313. Update "Redundant" to "Reliable" in new website. (apache#73)
Most Ozone developers will not be familiar with javascript package management. To make it easy for them to update packages needed to build the website, add a high level explanation of pnpm files and commands for package management.
HDDS-10222