-
Notifications
You must be signed in to change notification settings - Fork 3
/
package.json
211 lines (211 loc) · 7.88 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
{
"name": "@moduk/frontend",
"version": "2.0.19",
"description": "The MOD.UK Frontend contains the code you need to start building a user interface for Ministry of Defence platforms and services.",
"main": "dist/lib/index.js",
"sass": "src/css/index.scss",
"style": "dist/css/index.css",
"files": [
"dist/**",
"src/css/",
"!src/react/",
"src/react/**/__examples__/**",
"!**/*.tgz",
"!**/__tests__/**"
],
"exports": {
".": {
"types": "./dist/lib/index.d.ts",
"require": "./dist/lib/index.js",
"sass": "./src/css/index.scss",
"style": "./dist/css/index.css"
},
"./client": {
"import": "./dist/client/moduk-frontend.mjs",
"require": "./dist/client/moduk-frontend.umd.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"import": "./dist/react/esm/index.js",
"require": "./dist/react/index.js"
},
"./dist/*": "./dist/*"
},
"types": "dist/lib/index.d.ts",
"scripts": {
"build": "npm run build:assets && npm run build:css && npm run build:lib && npm run build:client",
"prebuild:assets": "shx rm -rf dist/assets",
"build:assets": "ts-node scripts/copy-govuk-static-assets.ts && npm run build:assets:svg",
"build:assets:svg": "shx mkdir -p dist/assets/svg && cp src/assets/svg/* dist/assets/svg",
"prebuild:client": "shx rm -rf dist/client",
"build:client": "npm run build:client:umd && npm run build:client:es && npm run build:client:react",
"build:client:umd": "webpack --config webpack.config.ts",
"build:client:es": "babel src/client/index.ts --extensions .ts,.tsx --out-file dist/client/moduk-frontend.mjs",
"prebuild:client:react": "shx rm -rf dist/react",
"build:client:react": "npm run build:client:react:es && npm run build:client:react:cjs && npm run build:client:react:types",
"build:client:react:es": "BABEL_ENV=es babel src/react/ --ignore 'src/react/**/__examples__' --ignore 'src/react/**/__tests__' --extensions .ts,.tsx --out-dir dist/react/esm --out-file-extension .js",
"build:client:react:cjs": "webpack --config webpack-react-prod.config.ts",
"build:client:react:types": "tsc --project tsconfig.react.json",
"prebuild:css": "shx rm -rf dist/css",
"build:css": "sass --load-path=node_modules --quiet-deps --style compressed src/css/index.scss | postcss -o dist/css/index.css",
"prebuild:lib": "shx rm -rf dist/nunjucks dist/lib",
"build:lib": "tsc --project tsconfig.build.json && shx cp -r src/nunjucks dist",
"examples:dev:react": "webpack --config webpack-react-example.config.ts --node-env development --watch",
"examples:build:react": "webpack --config webpack-react-example.config.ts --node-env production",
"preexamples:build": "shx rm -rf examples-site/dist",
"examples:build": "npm run build && npm run examples:build:react && eleventy",
"examples:serve": "eleventy --serve",
"format": "dprint fmt",
"format:check": "dprint check",
"lint": "npm run lint:source && npm run lint:styles",
"lint:fix": "npm run lint:source:fix",
"lint:source": "eslint --ext .js --ext .ts --ext .tsx --ext .mjs --ext .mts --max-warnings 0 .",
"lint:source:fix": "npm run lint:source -- --fix",
"lint:styles": "stylelint 'src/**/*.scss'",
"dist:build": "npm run build && ts-node scripts/prepare-dist-package.ts",
"dist:pack": "npm run dist:build && cd dist && npm pack",
"playwright-install": "playwright install --with-deps",
"prepack": "[ \"$npm_command\" = 'pack' ]] && echo 'Use `npm run dist:pack` instead' && exit 1",
"prepublishOnly": "echo 'Run `npm run predist:pack && npm publish ./dist` instead' && exit 1",
"start": "concurrently npm:examples:serve npm:examples:dev:react",
"test": "vitest run && npm run test:types",
"test:e2e": "npm run build && playwright test --grep-invert @visual-regression",
"test:e2e:show-report": "playwright show-report e2e/output/html",
"test:e2e:trace": "npm run test:e2e -- --trace retain-on-failure",
"test:types": "vitest --typecheck.only --run",
"test:visual": "scripts/run-playwright-container.sh bash -c 'npm install && npm run test:visual:native'",
"test:visual:clean": "shx rm -rf 'e2e/tests/__screenshots__'",
"test:visual:native": "npm run build && playwright test --grep @visual-regression",
"test:visual:refresh": "scripts/run-playwright-container.sh bash -c 'npm install && npm run test:visual:native -- --update-snapshots'",
"test:watch": "vitest",
"prepare": "husky install",
"release": "release-it"
},
"repository": {
"type": "git",
"url": "git+https://github.com/defencedigital/moduk-frontend.git"
},
"keywords": [
"moduk",
"mod",
"frontend",
"design",
"system"
],
"author": "MOD.UK Design System Team",
"license": "MIT",
"bugs": {
"url": "https://github.com/defencedigital/moduk-frontend/issues"
},
"homepage": "https://github.com/defencedigital/moduk-frontend#readme",
"engines": {
"node": "^18.19.0 || ^20.11.0",
"npm": ">=8.15.0"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@axe-core/playwright": "^4.9.0",
"@babel/cli": "^7.25.9",
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@babel/register": "^7.25.9",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@playwright/test": "^1.42.1",
"@release-it/conventional-changelog": "^8.0.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/lodash": "^4.17.5",
"@types/node": "^18.19.18",
"@types/nunjucks": "^3.2.6",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.21",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"babel-loader": "^9.1.3",
"babel-plugin-inline-react-svg": "^2.0.2",
"babel-plugin-module-resolver": "^5.0.0",
"concurrently": "^8.2.2",
"dprint": "^0.45.1",
"eslint": "^8.52.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unicorn": "^51.0.1",
"glob": "^10.3.15",
"happy-dom": "^15.11.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"postcss-cli": "^11.0.0",
"postcss-fail-on-warn": "^0.2.1",
"postcss-preset-env": "^9.3.0",
"react-merge-refs": "^2.1.1",
"release-it": "^17.1.1",
"sass": "^1.69.3",
"sass-true": "^8.0.0",
"shelljs": "^0.8.5",
"shx": "^0.3.4",
"stylelint": "^15.11.0",
"stylelint-config-standard-scss": "^11.1.0",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.4.5",
"vitest": "^1.2.1",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4"
},
"lint-staged": {
"*.{cjs,js,jsx,mjs,mts,ts,tsx}": [
"dprint fmt",
"eslint --max-warnings 0"
],
"*.{scss}": [
"dprint fmt",
"stylelint"
],
"*.{md,yaml,yml}": [
"dprint fmt"
]
},
"dependencies": {
"@types/shelljs": "^0.8.15",
"clsx": "^2.1.1",
"lodash": "^4.17.21",
"pac-resolver": "^7.0.1",
"react-keyed-flatten-children": "^3.0.0",
"react-merge-refs": "^2.1.1"
},
"overrides": {
"playwright-core": "$@playwright/test",
"proxy-agent": "^6.3.0",
"semver": "^7.5.3",
"optionator": "^0.9.3"
},
"peerDependencies": {
"govuk-frontend": "^5.3.1",
"nunjucks": "^3.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"peerDependenciesMeta": {
"nunjucks": {
"optional": true
},
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
},
"publishConfig": {
"access": "public"
}
}