Skip to content

Commit ceef42c

Browse files
Merge branch 'main' into add-pagination-options
2 parents 82c26a9 + ed582e5 commit ceef42c

File tree

7 files changed

+84
-208
lines changed

7 files changed

+84
-208
lines changed

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: npm start --workspace @nhsuk/frontend-review

package-lock.json

Lines changed: 15 additions & 161 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"clean": "del-cli dist/**",
2222
"prebuild": "npm run clean",
2323
"build": "npm run build --if-present --workspaces",
24+
"heroku-postbuild": "npm run build",
25+
"postheroku-postbuild": "NPM_CONFIG_PRODUCTION=true npm ci --omit=dev --omit=optional --workspace @nhsuk/frontend-review",
2426
"prestart": "npm run build",
2527
"start": "npm run watch",
2628
"watch": "concurrently npm:watch:* --kill-others --prefix-colors \"red.dim,blue.dim\"",
@@ -58,7 +60,7 @@
5860
"eslint": "^8.57.1",
5961
"eslint-config-prettier": "^10.1.5",
6062
"eslint-config-standard": "^17.1.0",
61-
"eslint-plugin-es-x": "^8.6.2",
63+
"eslint-plugin-es-x": "^8.7.0",
6264
"eslint-plugin-import": "^2.31.0",
6365
"eslint-plugin-jest": "^28.12.0",
6466
"eslint-plugin-jest-dom": "^5.5.0",
@@ -70,7 +72,7 @@
7072
"html-validate": "^9.5.3",
7173
"jest": "^29.7.0",
7274
"jest-puppeteer": "^11.0.0",
73-
"playwright-core": "^1.52.0",
75+
"playwright-core": "^1.53.0",
7476
"postcss": "^8.5.4",
7577
"postcss-markdown": "^1.3.0",
7678
"postcss-scss": "^4.0.9",
@@ -84,5 +86,9 @@
8486
},
8587
"engines": {
8688
"node": "^20.9.0 || ^22.11.0"
89+
},
90+
"overrides": {
91+
"playwright": "$playwright-core",
92+
"puppeteer": "$puppeteer"
8793
}
8894
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
const { join } = require('path')
2+
3+
const { PORT = '3000' } = process.env
4+
5+
/**
6+
* Browsersync config
7+
*
8+
* @type {Options}
9+
*/
10+
module.exports = {
11+
ghostMode: false,
12+
host: '0.0.0.0',
13+
14+
// Redirect to start path
15+
middleware: [
16+
{
17+
route: '/',
18+
handle(req, res) {
19+
res.writeHead(302, { location: '/nhsuk-frontend/' })
20+
res.end()
21+
}
22+
}
23+
],
24+
25+
online: false,
26+
open: false,
27+
notify: false,
28+
port: Number(PORT),
29+
30+
// Development server
31+
server: {
32+
baseDir: join(__dirname, 'dist'),
33+
directory: true
34+
},
35+
36+
// Match local paths to deployed preview
37+
// https://nhsuk.github.io/nhsuk-frontend
38+
serveStatic: [
39+
{
40+
route: '/nhsuk-frontend',
41+
dir: join(__dirname, 'dist')
42+
}
43+
],
44+
45+
// Show start path in console
46+
startPath: '/nhsuk-frontend/'
47+
}
48+
49+
/**
50+
* @import { Options } from 'browser-sync'
51+
*/

packages/nhsuk-frontend-review/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
"build": "gulp build --color",
1010
"serve": "gulp serve --color",
1111
"watch": "gulp serve watch --color",
12-
"start": "npm run watch"
12+
"start": "browser-sync start --config browsersync.config.js"
13+
},
14+
"dependencies": {
15+
"browser-sync": "^3.0.4"
1316
},
1417
"devDependencies": {
1518
"@nhsuk/frontend-config": "*",
1619
"@nhsuk/frontend-tasks": "*",
17-
"browser-sync": "^3.0.4",
1820
"del-cli": "^6.0.0",
1921
"glob": "^11.0.2",
2022
"gulp": "^5.0.1",

packages/nhsuk-frontend-review/src/index.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="nhsuk-grid-row">
1818
<div class="nhsuk-grid-column-two-thirds">
1919
<h1 class="nhsuk-heading-xl nhsuk-u-margin-bottom-4">NHS.UK frontend</h1>
20-
<p class="nhsuk-body">Deployed automatically from <a href="https://github.com/nhsuk/nhsuk-frontend/commits/main" rel="noreferrer noopener" target="_blank"><code>main</code> branch (opens in new tab).</a></p>
20+
<p class="nhsuk-body">Deployed automatically from <a href="https://github.com/nhsuk/nhsuk-frontend/commits/{{ branchName }}" rel="noreferrer noopener" target="_blank"><code>{{ branchName }}</code> branch (opens in new tab).</a></p>
2121

2222
<h2 class="nhsuk-heading-l">Components and variants</h2>
2323
<p class="nhsuk-body">These examples are used for automated tests and may not follow service manual best practice.</p>

0 commit comments

Comments
 (0)