|
2 | 2 |
|
3 | 3 | ## Install |
4 | 4 |
|
5 | | - |
6 | 5 | ## Usage |
7 | 6 |
|
8 | | - |
9 | 7 | ## Develop |
10 | 8 |
|
11 | 9 | This is a mono repository, managed with [Nx](https://nx.dev). |
12 | 10 |
|
13 | 11 | 1. `git clone` this repo & `cd` into it as usual |
14 | 12 | 2. run `pnpm setup` from the top-level: |
15 | | - - installs all external dependencies |
16 | | - - links all internal dependencies |
| 13 | + - installs all external dependencies |
| 14 | + - links all internal dependencies |
17 | 15 |
|
18 | 16 | To add a new package to the repo: |
19 | | - - install [slimer](https://github.com/TryGhost/slimer) |
20 | | - - run `slimer new <package name>` |
21 | 17 |
|
| 18 | +- install [slimer](https://github.com/TryGhost/slimer) |
| 19 | +- run `slimer new <package name>` |
22 | 20 |
|
23 | 21 | ## Run |
24 | 22 |
|
25 | 23 | - `pnpm dev` |
26 | 24 |
|
27 | | - |
28 | 25 | ## Test |
29 | 26 |
|
30 | 27 | - `pnpm lint` runs `oxlint` across all packages |
31 | 28 | - `pnpm format` formats `js/ts/json/md` files with `oxfmt` |
32 | 29 | - `pnpm format:check` checks formatting without writing |
33 | 30 | - `pnpm test` runs tests (most packages also run lint in `posttest`) |
34 | 31 |
|
35 | | - |
36 | 32 | ## Publish |
37 | 33 |
|
38 | 34 | 1. run one of the release commands in the top-level `framework` directory: |
39 | | - - `pnpm ship:patch` |
40 | | - - `pnpm ship:minor` |
41 | | - - `pnpm ship:major` |
42 | | - - for initial Nx bootstrap in long-unreleased repos: `pnpm ship:first-release` |
| 35 | + - `pnpm ship:patch` |
| 36 | + - `pnpm ship:minor` |
| 37 | + - `pnpm ship:major` |
| 38 | + - for initial Nx bootstrap in long-unreleased repos: `pnpm ship:first-release` |
| 39 | + - by default these bump **every** package in `packages/*` to the same level. To scope a release to specific packages, append `--projects=` with comma-separated directory names (not npm names), e.g. `pnpm ship:minor --projects=api-framework,domain-events` |
| 40 | + - append `--dry-run` to preview which packages would be bumped without committing |
43 | 41 | 2. this runs tests, versions packages, and creates/pushes release commit + tags |
44 | | - - creates the version commit and pushes tags to `main` |
| 42 | + - creates the version commit and pushes tags to `main` |
45 | 43 | 3. CI automatically publishes packages via `.github/workflows/publish.yml`: |
46 | | - - authenticates to npm via [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) (OIDC, no long-lived tokens) |
47 | | - - checks each `packages/*` package version against npm |
48 | | - - runs `pnpm publish` (via `nx release publish`) only for versions that are not already published, with provenance attestations enabled |
49 | | - |
| 44 | + - authenticates to npm via [Trusted Publishing](https://docs.npmjs.com/trusted-publishers) (OIDC, no long-lived tokens) |
| 45 | + - checks each `packages/*` package version against npm |
| 46 | + - runs `pnpm publish` (via `nx release publish`) only for versions that are not already published, with provenance attestations enabled |
50 | 47 |
|
51 | | -# Copyright & License |
| 48 | +# Copyright & License |
52 | 49 |
|
53 | 50 | Copyright (c) 2013-2026 Ghost Foundation - Released under the [MIT license](LICENSE). |
0 commit comments