chore: switch from npm to pnpm and update build scripts
This commit is contained in:
28
README.md
28
README.md
@@ -33,20 +33,20 @@ The site is designed to match the feel of the main `www.projectmycelium.com` sit
|
||||
### Prerequisites
|
||||
|
||||
- Node.js **18+** (LTS recommended).
|
||||
- npm (comes with Node).
|
||||
- [pnpm](https://pnpm.io/) (recommended) or npm (comes with Node).
|
||||
|
||||
### Install Dependencies
|
||||
|
||||
From the project root (`docs_projectmycelium`):
|
||||
|
||||
```bash
|
||||
npm install
|
||||
pnpm install
|
||||
```
|
||||
|
||||
### Run the Dev Server
|
||||
|
||||
```bash
|
||||
npm start
|
||||
pnpm start
|
||||
```
|
||||
|
||||
Then open:
|
||||
@@ -65,7 +65,7 @@ The main sections are available at:
|
||||
### Build the Site
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
pnpm build
|
||||
```
|
||||
|
||||
This creates a production build in the `build/` directory.
|
||||
@@ -73,22 +73,22 @@ This creates a production build in the `build/` directory.
|
||||
### Serve the Production Build (Local Test)
|
||||
|
||||
```bash
|
||||
npm run serve
|
||||
pnpm serve
|
||||
```
|
||||
|
||||
Docusaurus will serve the contents of `build/` so you can verify the production build locally.
|
||||
|
||||
---
|
||||
|
||||
## npm Scripts
|
||||
## Package Scripts
|
||||
|
||||
Defined in `package.json`:
|
||||
Defined in `package.json` (run with `pnpm <script>` or `pnpm run <script>`):
|
||||
|
||||
- `npm start` – Start local dev server (hot reload).
|
||||
- `npm run build` – Build static site into `build/`.
|
||||
- `npm run serve` – Serve the built site locally.
|
||||
- `npm run deploy` – Run Docusaurus deploy (GitHub Pages style; see below).
|
||||
- `npm run clear` – Clear Docusaurus caches.
|
||||
- `start` – Start local dev server (hot reload).
|
||||
- `build` – Build static site into `build/`.
|
||||
- `serve` – Serve the built site locally.
|
||||
- `deploy` – Run Docusaurus deploy (GitHub Pages style; see below).
|
||||
- `clear` – Clear Docusaurus caches.
|
||||
|
||||
---
|
||||
|
||||
@@ -133,7 +133,7 @@ The Docusaurus config assumes:
|
||||
1. **Build the site** on your local machine or CI:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
pnpm build
|
||||
```
|
||||
|
||||
This produces static assets under `build/`.
|
||||
@@ -171,7 +171,7 @@ The Docusaurus config assumes:
|
||||
1. Create a branch from the main docs branch.
|
||||
2. Add or update Markdown files under `docs/`.
|
||||
3. Keep slugs and sidebar entries consistent with the existing IA.
|
||||
4. Run `npm run build` locally before opening a PR to catch broken links.
|
||||
4. Run `pnpm build` locally before opening a PR to catch broken links.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user