Skip to content

Commit a7b89f1

Browse files
committed
add initial app state for development with redux/theming set up
1 parent 23ce95f commit a7b89f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4388
-856
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,6 @@ cython_debug/
178178
# Project specific files
179179
*.json
180180
*.yaml
181-
!ui/**/*.json
181+
182+
# Turn off UI related ignores, defer to ui/.gitignore
183+
!ui/**

ui/.eslintrc.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,25 @@
3939
"import/order": [
4040
"error",
4141
{
42-
"groups": [["builtin", "external", "internal"]],
43-
"newlines-between": "always"
42+
"groups": [
43+
["builtin", "external"],
44+
["internal", "parent", "sibling", "index"]
45+
],
46+
"newlines-between": "always-and-inside-groups",
47+
"pathGroups": [
48+
{
49+
"pattern": "{@,assets,classes,components,hooks,pages,store,tests,types,utils}/**",
50+
"group": "internal",
51+
"position": "before"
52+
},
53+
{
54+
"pattern": "{.,..}/**",
55+
"group": "internal",
56+
"position": "after"
57+
}
58+
],
59+
"pathGroupsExcludedImportTypes": ["builtin"],
60+
"alphabetize": { "order": "asc", "caseInsensitive": true }
4461
}
4562
],
4663
"import/no-extraneous-dependencies": [

ui/jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ const customJestConfig = {
1111
coverageReporters: ['json-summary'],
1212
moduleFileExtensions: ['ts', 'tsx', 'js'],
1313
moduleNameMapper: {
14+
'^.+\\.(svg)$': '<rootDir>/__mocks__/svg.js',
1415
'^@/(.*)$': '<rootDir>/src/$1',
16+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
17+
'<rootDir>/__mocks__/fileMock.js',
18+
'\\.(css|less|scss|sass)$': '<rootDir>/__mocks__/styleMock.js',
1519
},
1620
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
1721
testEnvironment: 'jest-environment-jsdom',

ui/next.config.mjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
output: 'export',
4+
webpack(config) {
5+
// Grab the existing rule that handles SVG imports
6+
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'));
7+
8+
config.module.rules.push(
9+
// Reapply the existing rule, but only for svg imports ending in ?url
10+
{
11+
...fileLoaderRule,
12+
test: /\.svg$/i,
13+
resourceQuery: /url/, // *.svg?url
14+
},
15+
// Convert all other *.svg imports to React components
16+
{
17+
test: /\.svg$/i,
18+
issuer: fileLoaderRule.issuer,
19+
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url
20+
use: ['@svgr/webpack'],
21+
},
22+
{
23+
test: /\.(woff|woff2|eot|ttf|otf)$/,
24+
type: 'asset/resource',
25+
generator: {
26+
filename: 'static/fonts/[name][ext]',
27+
},
28+
}
29+
);
30+
31+
// Modify the file loader rule to ignore *.svg, since we have it handled now.
32+
fileLoaderRule.exclude = /\.svg$/i;
33+
34+
return config;
35+
},
436
};
537

638
export default nextConfig;

0 commit comments

Comments
 (0)