Skip to content

Commit f849c7c

Browse files
authored
Merge pull request #923 from finos/rm-vite-workbench-2
Rm vite workbench 2
2 parents 99772d0 + 6311df9 commit f849c7c

10 files changed

Lines changed: 7687 additions & 33966 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ website/.docusaurus/**
1818

1919
.idea/
2020
*.iml
21-
website/.yarn
21+
website/.yarn

netlify.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
1010
content="FDC3 workbench application, designed to help develop and test FDC3 integrations"
1111
/>
12-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/fdc3-icon-192.png" />
13-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
12+
<link rel="apple-touch-icon" href="/fdc3-icon-192.png" />
13+
<link rel="manifest" href="/manifest.json" />
1414
<title>FDC3 Workbench</title>
1515
</head>
1616
<body>
1717
<noscript>You need to enable JavaScript to run this app.</noscript>
1818
<div id="root"></div>
19+
<script type="module" src="/src/index.tsx"></script>
1920
</body>
2021
</html>

toolbox/fdc3-workbench/package-lock.json

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

toolbox/fdc3-workbench/package.json

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@material-ui/core": "^4.11.4",
1212
"@material-ui/icons": "^4.11.2",
1313
"@material-ui/lab": "^4.0.0-alpha.59",
14-
"@types/node": "^12.0.0",
14+
"@types/node": "^14.0.0",
1515
"@types/react": "^17.0.0",
1616
"@types/react-dom": "^17.0.0",
1717
"@types/uuid": "^8.3.4",
@@ -22,16 +22,15 @@
2222
"normalize.css": "^8.0.1",
2323
"react": "^17.0.2",
2424
"react-dom": "^17.0.2",
25-
"react-scripts": "4.0.3",
2625
"typescript": "^4.1.2",
2726
"uuid": "^9.0.0",
2827
"web-vitals": "^1.0.1"
2928
},
3029
"scripts": {
31-
"start": "react-scripts start",
32-
"build": "react-scripts build",
33-
"test": "react-scripts test",
34-
"eject": "react-scripts eject",
30+
"dev": "vite",
31+
"start": "vite",
32+
"preview": "vite preview",
33+
"build": "tsc && vite build",
3534
"lint": "eslint --cache --quiet **/*.{ts,tsx,js,jsx} && prettier --check **/*.{ts,tsx,js,jsx,json,yml,css,html,md}",
3635
"lint:fix": "eslint --cache --quiet --fix **/*.{ts,tsx,js,jsx} && prettier --write **/*.{ts,tsx,js,jsx} && prettier --write **/*.{json,yml,css,html,md}"
3736
},
@@ -54,15 +53,19 @@
5453
},
5554
"devDependencies": {
5655
"@types/jsoneditor": "^8.6.1",
57-
"@typescript-eslint/eslint-plugin": "^4.27.0",
58-
"@typescript-eslint/parser": "^4.27.0",
56+
"@typescript-eslint/eslint-plugin": "^5.48.0",
57+
"@typescript-eslint/parser": "^5.48.0",
58+
"@vitejs/plugin-legacy": "^3.0.1",
59+
"@vitejs/plugin-react": "^3.0.1",
5960
"eslint": "^7.28.0",
6061
"eslint-config-prettier": "^8.3.0",
6162
"eslint-plugin-import": "^2.23.4",
6263
"eslint-plugin-react": "^7.24.0",
6364
"lint-staged": "^11.0.0",
6465
"prettier": "^2.3.1",
65-
"pretty-quick": "^3.1.0"
66+
"pretty-quick": "^3.1.0",
67+
"terser": "^5.16.1",
68+
"vite": "^4.0.4"
6669
},
6770
"lint-staged": {
6871
"*.{ts,tsx,js,jsx}": [
@@ -72,16 +75,5 @@
7275
"*.{json,yml,css,html,md}": "prettier --write --prose-wrap never",
7376
"*.js": "eslint --cache --fix",
7477
"*.{js,css,md}": "prettier --write"
75-
},
76-
"overrides": {
77-
"css-select": "^3.1.0",
78-
"css-what": "^5.0.1",
79-
"shell-quote": "^1.7.3",
80-
"node-forge": "^1.0.0",
81-
"immer": "^9.0.6",
82-
"glob-parent": "^5.1.2",
83-
"ejs": "^3.1.7",
84-
"browserslist": "^4.16.5",
85-
"ansi-html": "^0.0.8"
8678
}
8779
}

toolbox/fdc3-workbench/src/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const Header = (props: { fdc3Available: boolean }) => {
7979
<Toolbar className={classes.toolbar}>
8080
<div>
8181
<Typography variant="h3" color="inherit" className={classes.fdc3}>
82-
<img src="./fdc3-logo.svg" className={classes.headerCube} />
82+
<img src={`${import.meta.env.BASE_URL}/fdc3-logo.svg`} className={classes.headerCube} />
8383
</Typography>
8484
</div>
8585

toolbox/fdc3-workbench/src/react-app-env.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "esnext",
4+
"useDefineForClassFields": true,
45
"lib": [
56
"dom",
67
"dom.iterable",
78
"esnext"
89
],
9-
"allowJs": true,
10+
"allowJs": false,
1011
"skipLibCheck": true,
11-
"esModuleInterop": true,
12+
"esModuleInterop": false,
1213
"allowSyntheticDefaultImports": true,
1314
"strict": true,
1415
"forceConsistentCasingInFileNames": true,
@@ -18,9 +19,11 @@
1819
"resolveJsonModule": true,
1920
"isolatedModules": true,
2021
"noEmit": true,
21-
"jsx": "react-jsx"
22+
"jsx": "react-jsx",
23+
"types": ["node", "vite/client"]
2224
},
2325
"include": [
2426
"src"
25-
]
27+
],
28+
"references": [{ "path": "./tsconfig.node.json" }]
2629
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"module": "ESNext",
5+
"moduleResolution": "Node",
6+
"allowSyntheticDefaultImports": true
7+
},
8+
"include": ["vite.config.ts"]
9+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import legacy from "@vitejs/plugin-legacy";
2+
import react from "@vitejs/plugin-react";
3+
import { defineConfig } from "vite";
4+
5+
// https://vitejs.dev/config/
6+
export default defineConfig({
7+
base: "/toolbox/fdc3-workbench",
8+
build: {
9+
outDir: "build",
10+
},
11+
define: {
12+
"process.env": "import.meta.env",
13+
"process.platform": "({})",
14+
"global.process": "globalThis.process",
15+
},
16+
plugins: [
17+
react(),
18+
legacy({
19+
targets: ["defaults", "not IE 11"],
20+
}),
21+
],
22+
server: { port: 3000 },
23+
});

0 commit comments

Comments
 (0)