Skip to content

Commit

Permalink
Merge pull request #386 from guardian/ei/migrate-to-pnpm
Browse files Browse the repository at this point in the history
Migrate to use pnpm
  • Loading branch information
emma-imber authored Jun 19, 2024
2 parents d14333a + abdf5f3 commit d311194
Show file tree
Hide file tree
Showing 6 changed files with 4,047 additions and 3,341 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: guardian/actions-setup-node@main
- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install --frozen-lockfile
shell: bash

- name: Lint files
run: yarn lint
run: pnpm lint

types:
name: Typescript
Expand All @@ -27,14 +34,21 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: guardian/actions-setup-node@main
- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install --frozen-lockfile
shell: bash

- name: Check typescript
run: yarn tsc
run: pnpm tsc

build:
name: Build
Expand All @@ -43,11 +57,18 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: guardian/actions-setup-node@main
- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install --frozen-lockfile
shell: bash

- name: Build
run: yarn build
run: pnpm build
43 changes: 32 additions & 11 deletions .github/workflows/gam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: guardian/actions-setup-node@main
- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install --frozen-lockfile
shell: bash

- name: Lint files
run: yarn lint
run: pnpm lint

types:
name: Typescript
Expand All @@ -37,14 +44,21 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: guardian/actions-setup-node@main
- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install --frozen-lockfile
shell: bash

- name: Check typescript
run: yarn tsc
run: pnpm tsc

deploy:
name: Deploy
Expand All @@ -62,14 +76,21 @@ jobs:
- name: Install pipenv
run: pip install pipenv

- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
shell: bash

- name: Build
run: yarn build
run: pnpm build

- name: Install Dependencies
run: pipenv install
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: guardian/actions-setup-node@main
- run: corepack enable
shell: bash

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm install --frozen-lockfile
shell: bash

- name: Build site
run: yarn build
run: pnpm build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"version": "0.0.1",
"license": "Apache-2.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite dev --port 7777",
"build": "vite build && touch build/.nojekyll",
"publish": "yarn gh-pages --dist build --dotfiles",
"deploy": "yarn build && yarn publish",
"publish": "pnpm gh-pages --dist build --dotfiles",
"deploy": "pnpm build && pnpm publish",
"package": "svelte-kit package",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
Expand Down Expand Up @@ -45,10 +46,12 @@
"sass": "^1.69.7",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-preprocess": "^6.0.1",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.12"
},
"type": "module",
"dependencies": {}
"dependencies": {},
"packageManager": "pnpm@8.15.5"
}
Loading

0 comments on commit d311194

Please sign in to comment.