Skip to content

Commit 387d531

Browse files
authored
Use npm instead of yarn (#2358)
1 parent de705e1 commit 387d531

7 files changed

Lines changed: 13022 additions & 6179 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
node-version: "22"
2222

2323
- name: Install dependencies
24-
run: yarn install --immutable
24+
run: npm ci
2525

2626
- name: Run tests
27-
run: yarn run test-ci
27+
run: npm run test-ci
2828

2929
- name: Make a production build
30-
run: yarn build:production
30+
run: npm run build:production

.github/workflows/gcp_deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
node-version: "22"
2121

2222
- name: Install dependencies
23-
run: yarn install --immutable
23+
run: npm ci
2424

2525
- name: Test current build
26-
run: yarn run test-ci
26+
run: npm run test-ci
2727
continue-on-error: true
2828

2929
deploy-stage:
@@ -50,8 +50,8 @@ jobs:
5050

5151
- name: Build the website
5252
run: |
53-
yarn install --immutable
54-
yarn build:production
53+
npm ci
54+
npm run build:production
5555
5656
- name: Build version.json file
5757
run: |

.github/workflows/gcp_deploy_prod.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
node-version: "22"
2222

2323
- name: Install dependencies
24-
run: yarn install --immutable
24+
run: npm ci
2525

2626
- name: Test current build
27-
run: yarn run test-ci
27+
run: npm run test-ci
2828
continue-on-error: true
2929

3030
deploy-prod:
@@ -52,8 +52,8 @@ jobs:
5252

5353
- name: Build the website
5454
run: |
55-
yarn install --immutable
56-
yarn build:production
55+
npm ci
56+
npm run build:production
5757
5858
- name: Build version.json file
5959
run: |

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,28 @@ For notes on how to deploy the project on a live system, see [Deployment](#deplo
1717
### Prerequisites
1818

1919
- [Node JS](https://nodejs.org/en/). Runnning the LTS release is recommended.
20-
- [Yarn](https://yarnpkg.com/en/) for package management.
2120

2221
```
23-
yarn install
22+
npm install
2423
```
2524

2625
To start local development, run:
2726

2827
```
29-
yarn start
28+
npm start
3029
```
3130

3231
**ℹ️ NOTE:** Running locally will show unpublished content that uses the `published: false` convention in frontmatter. Content with `published: false` will not be available on staging or production.
3332

3433

35-
### Available yarn commands
34+
### Available npm commands
3635

37-
| Command | Description |
38-
| ------------------------ | --------------------------------------------------------------------------------------- |
39-
| `yarn start` | Starts eleventy and includes unpublished content. |
40-
| `yarn build:production` | Builds the site for production. |
41-
| `yarn build:unpublished` | Builds the site for production with unpublished content. |
42-
| `yarn clean` | Clears the output directory. (You probably won't need to use this manually.) |
36+
| Command | Description |
37+
| ------------------------ | -------------------------------------------------------------------------------------- |
38+
| `npm start` | Starts eleventy and includes unpublished content. |
39+
| `npm build:production` | Builds the site for production. |
40+
| `npm build:unpublished` | Builds the site for production with unpublished content. |
41+
| `npm clean` | Clears the output directory. (You probably won't need to use this manually.) |
4342

4443
## How the site is built
4544

@@ -49,7 +48,7 @@ The site works in slightly different ways depending on whether you're running th
4948

5049
### Development builds
5150

52-
When you run `yarn start` the CSS and JS is built in parallel with the eleventy build. Once up and running both eleventy and the JS and CSS build scripts watch for changes. When something changes the site is re-built.
51+
When you run `npm start` the CSS and JS is built in parallel with the eleventy build. Once up and running both eleventy and the JS and CSS build scripts watch for changes. When something changes the site is re-built.
5352

5453
In development Eleventy knows nothing about the CSS and JavaScript builds. For automatic reloading of the JS and CSS, each script uses a fetch to the public API to tell browserSync there is new code and it reloads it for you.
5554

@@ -109,7 +108,7 @@ extensionworkshop.com
109108
│ ├── includes # Components (Liquid)
110109
│ └── layouts # Layout templates
111110
112-
├── tests # Test files run by jest `yarn test`.
111+
├── tests # Test files run by jest `npm test`.
113112
114113
├── eleventy.config.js # Eleventy configuration
115114
├── .eleventyignore # Files ignored by Eleventy
@@ -120,7 +119,6 @@ extensionworkshop.com
120119
├── .eslintrc # eslint config
121120
├── .eslintignore # Files ignored by eslint
122121
├── package.json # Node.js package manifest
123-
├── yarn.lock # Package manager lock file
124122
└── README.md # This file
125123
```
126124

0 commit comments

Comments
 (0)