@mongez/pkgist 1.0.2 → 1.0.3
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 +25 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,33 +13,45 @@ A build, version, and publish tool for TypeScript/React npm packages. Powered by
|
|
|
13
13
|
- **npm publish** — publishes from the build directory, not the source
|
|
14
14
|
- **Dry-run mode** — prints every step without touching disk, git, or npm
|
|
15
15
|
- **Concurrency** — builds multiple packages in parallel
|
|
16
|
-
- **TypeScript config** — `
|
|
16
|
+
- **TypeScript config** — `pkgist.config.ts` with full type safety via `defineConfig`
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
|
|
24
|
-
npm install
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
# Global — use the CLI anywhere
|
|
24
|
+
npm install -g @mongez/pkgist
|
|
25
|
+
|
|
26
|
+
# Or as a dev dependency in your monorepo root
|
|
27
|
+
npm install -D @mongez/pkgist
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add a script to your root `package.json` for convenience:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"scripts": {
|
|
35
|
+
"release": "pkgist build:all",
|
|
36
|
+
"release:dry": "pkgist build:all --dry-run"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
27
39
|
```
|
|
28
40
|
|
|
29
41
|
---
|
|
30
42
|
|
|
31
43
|
## Configuration
|
|
32
44
|
|
|
33
|
-
Create a `
|
|
45
|
+
Create a `pkgist.config.ts` in your project root (auto-discovered; `builder.ts` also works):
|
|
34
46
|
|
|
35
47
|
```ts
|
|
36
48
|
import { defineConfig } from "@mongez/pkgist";
|
|
37
49
|
|
|
38
50
|
export default defineConfig({
|
|
39
51
|
settings: {
|
|
40
|
-
concurrency: 8,
|
|
41
|
-
buildDir: "../builds",
|
|
42
|
-
sourcesDir: "../sources", // where source snapshots are archived
|
|
52
|
+
concurrency: 8, // parallel build limit (default: 4)
|
|
53
|
+
buildDir: "../builds", // where compiled packages are written
|
|
54
|
+
sourcesDir: "../sources", // optional: where source snapshots are archived
|
|
43
55
|
},
|
|
44
56
|
|
|
45
57
|
// Standalone: each package versions independently
|
|
@@ -75,7 +87,7 @@ Every entry in `standalone[]` and `families[].packages[]` accepts:
|
|
|
75
87
|
| Option | Type | Default | Description |
|
|
76
88
|
|---|---|---|---|
|
|
77
89
|
| `name` | `string` | **required** | npm package name |
|
|
78
|
-
| `root` | `string` | **required** | Path to package root, relative to `
|
|
90
|
+
| `root` | `string` | **required** | Path to package root, relative to `pkgist.config.ts` |
|
|
79
91
|
| `type` | `"typescript" \| "react"` | `"typescript"` | React packages get JSX support |
|
|
80
92
|
| `formats` | `("esm" \| "cjs")[]` | `["esm", "cjs"]` | Output formats |
|
|
81
93
|
| `mainType` | `"cjs" \| "esm"` | `"cjs"` | Primary format (affects `main` field in package.json) |
|
|
@@ -95,13 +107,13 @@ Every entry in `standalone[]` and `families[].packages[]` accepts:
|
|
|
95
107
|
|
|
96
108
|
| Option | Type | Default | Description |
|
|
97
109
|
|---|---|---|---|
|
|
98
|
-
| `version` | `"auto" \| string` | `"auto"` | `"auto"`
|
|
110
|
+
| `version` | `"auto" \| "patch" \| "minor" \| "major" \| string` | `"auto"` | `"auto"`/`"patch"` bumps the patch digit; `"minor"` bumps minor; `"major"` bumps major; any semver string uses that version exactly |
|
|
99
111
|
|
|
100
112
|
### Family-level options
|
|
101
113
|
|
|
102
114
|
| Option | Type | Default | Description |
|
|
103
115
|
|---|---|---|---|
|
|
104
|
-
| `version` | `"auto" \| string` | `"auto"` |
|
|
116
|
+
| `version` | `"auto" \| "patch" \| "minor" \| "major" \| string` | `"auto"` | Same strategies as standalone; applied to the highest current version across all family members |
|
|
105
117
|
| `commit` | `string` | — | Commit message applied to all packages (overrides per-package) |
|
|
106
118
|
|
|
107
119
|
---
|
|
@@ -200,7 +212,7 @@ Available on all `build` commands:
|
|
|
200
212
|
| `--no-publish` | Skip `npm publish` |
|
|
201
213
|
| `--no-git` | Skip git add / commit / push / tag |
|
|
202
214
|
| `--concurrency <n>` | Override the parallel build limit |
|
|
203
|
-
| `--config <path>` | Path to config file (default: `builder.ts` in cwd) |
|
|
215
|
+
| `--config <path>` | Path to config file (default: auto-discovers `pkgist.config.ts` / `builder.ts` in cwd) |
|
|
204
216
|
| `--verbose` | Show debug-level log lines |
|
|
205
217
|
|
|
206
218
|
---
|