You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains the rendering logic for articles on theguardian.com. It is a monorepo with 2 projects, `apps-rendering` and `dotcom-rendering`.
3
+
This repository contains the rendering logic for theguardian.com and for a subset of articles in the live apps.
4
4
5
-
## Developer setup
6
-
7
-
Install [Node.js](https://nodejs.org).
8
-
9
-
We recommend using [fnm](https://github.com/Schniz/fnm). It is great at managing multiple versions of Node.js on one machine.
10
-
11
-
> You may find it useful to add `--version-file-strategy recursive` to the [`fnm` shell setup](https://github.com/Schniz/fnm?tab=readme-ov-file#shell-setup). This will set the active Node version to first version it finds in the current directory _or_ any parent directory.
12
-
13
-
Once Node is installed, make sure you're using the correct package manager by [enabling corepack](https://github.com/nodejs/corepack?tab=readme-ov-file#utility-commands):
14
-
15
-
```sh
16
-
corepack enable
17
-
```
18
-
19
-
> [!NOTE]
20
-
>
21
-
> If you're using `asdf`, you'll need to run `asdf reshim nodejs` after running `corepack enable`.
22
-
23
-
## Install
24
-
25
-
Run `pnpm install` in the root directory of this project to install packages.
5
+
It is a monorepo with 2 projects, `apps-rendering` and `dotcom-rendering`.
26
6
27
7
## Run
28
8
29
-
You should always `cd` into the correct subdirectory before running commands (e.g `make dev` for dotcom-rendering, or `pnpm watch` for apps-rendering) except for storybook.
30
-
31
9
### `apps rendering`
32
10
33
11
Go to [apps rendering](apps-rendering/README.md) for more details.
@@ -38,15 +16,9 @@ Go to [dotcom rendering](dotcom-rendering/README.md) for more details.
38
16
39
17
## Root actions
40
18
41
-
Most commands are run from within each project but the following are managed from the monorepo root:
19
+
Most commands are run from within each project but the following can be run from the root:
42
20
43
-
### Storybook/Chromatic
21
+
### Storybook
44
22
45
23
`pnpm storybook` - Runs Storybook for all projects
46
24
`pnpm build-storybook` - Builds Storybook for all projects
47
-
48
-
Chromatic now runs at project level. `cd` into the project dir and run `pnpm chromatic -t [CHROMATIC PROJECT TOKEN]`
49
-
50
-
You can find the token in the project Chromatic instance.
51
-
52
-
To run Chromatic in CI on your pr, add the `run_chromatic` label once you're ready to check for visual regressions.
0 commit comments