pnpm-plugin-alex-857 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,19 @@ A pnpm config plugin that provides a shared **catalog** of dependency versions a
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## Developer checklist
|
|
14
|
+
|
|
15
|
+
Use this checklist when setting up a monorepo with this plugin:
|
|
16
|
+
|
|
17
|
+
- [ ] **Add the plugin** – From the monorepo root, run: `pnpm add --config pnpm-plugin-alex-857@latest`
|
|
18
|
+
- [ ] **Add scripts** – Copy the `scripts` block from Step 2 below into your root `package.json`
|
|
19
|
+
- [ ] **Use the catalog** – Add dependencies with `catalog:` in root or workspace `package.json`, or run `pnpm run install:catalog` to add all catalog packages at once
|
|
20
|
+
- [ ] **Verify** – Run `pnpm install` and confirm install and postinstall complete without errors
|
|
21
|
+
|
|
22
|
+
For updates: when a new version of the plugin is released, running **`pnpm install`** is enough (preinstall will pull the latest).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
13
26
|
## Setup (step by step)
|
|
14
27
|
|
|
15
28
|
### Step 1: Add the plugin as a config dependency
|
|
@@ -24,22 +37,17 @@ This updates your `pnpm-workspace.yaml` with a `configDependencies` entry and in
|
|
|
24
37
|
|
|
25
38
|
### Step 2: Add scripts to your root `package.json`
|
|
26
39
|
|
|
27
|
-
|
|
40
|
+
**Copy and paste** this `scripts` block into your root `package.json`:
|
|
28
41
|
|
|
29
42
|
```json
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
"version": "1.0.0",
|
|
33
|
-
"private": true,
|
|
34
|
-
"scripts": {
|
|
35
|
-
"preinstall": "pnpm add --config pnpm-plugin-alex-857@latest",
|
|
43
|
+
"scripts": {
|
|
44
|
+
"preinstall": "pnpm add --config pnpm-plugin-alex-857@latest && node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-workspace.js",
|
|
36
45
|
"postinstall": "pnpm run install:catalog",
|
|
37
46
|
"install:catalog": "node node_modules/.pnpm-config/pnpm-plugin-alex-857/install-catalog.js"
|
|
38
|
-
}
|
|
39
47
|
}
|
|
40
48
|
```
|
|
41
49
|
|
|
42
|
-
- **preinstall**: Ensures the latest plugin version is used
|
|
50
|
+
- **preinstall**: Ensures the latest plugin version is used and runs the workspace setup script.
|
|
43
51
|
- **postinstall**: Runs after `pnpm install` and adds all catalog packages to the root (if not already present).
|
|
44
52
|
- **install:catalog**: Manual script to add all catalog packages at once.
|
|
45
53
|
|