Skip to content

Commit

Permalink
ui: improve dev experience with form builder lib
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Garcia Garcia <miguel.garcia.garcia@cern.ch>
  • Loading branch information
miguelgrc committed Nov 20, 2023
1 parent 8e022c4 commit 707edb6
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 747 deletions.
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ yarn.lock
.gitignore
Dockerfile
*.svg
.npmrc
.npmrc
.yalc
yalc.lock
3 changes: 3 additions & 0 deletions ui/cap-react/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ bundle-stats.html
cypress/screenshots

.env

.yalc
yalc.lock
5 changes: 3 additions & 2 deletions ui/cap-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@vitejs/plugin-react": "3.1.0",
"antd": "^5.4.2",
"axios": "0.27.2",
"cap-moses": "file:.yalc/cap-moses",
"classnames": "2.3.1",
"clean-deep": "3.3.0",
"codemirror": "6.0.1",
Expand Down Expand Up @@ -78,8 +79,7 @@
"sanitize-html": "2.4.0",
"squirrelly": "8.0.8",
"vite": "4.2.1",
"vite-plugin-svgr": "2.4.0",
"cap-moses": "file:/Users/miguelg/projects/cap-moses"
"vite-plugin-svgr": "2.4.0"
},
"devDependencies": {
"autoprefixer": "7.1.4",
Expand All @@ -104,6 +104,7 @@
"replace": "0.3.0",
"rimraf": "2.6.1",
"rollup-plugin-visualizer": "5.9.0",
"vite-plugin-restart": "0.3.1",
"vitest": "0.30.1"
},
"keywords": [],
Expand Down
5 changes: 5 additions & 0 deletions ui/cap-react/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
import fs from "fs/promises";
import { visualizer } from "rollup-plugin-visualizer";
import ViteRestart from "vite-plugin-restart";

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
Expand All @@ -17,6 +18,10 @@ export default defineConfig(({ mode }) => {
gzipSize: true,
brotliSize: true,
}),
// Restarts the dev server (full reload aka --force) when a new version of cap-moses is available
ViteRestart({
restart: [".yalc/cap-moses/dist/cap-moses.js"],
}),
],
server: {
// Needed for Docker
Expand Down
Loading

0 comments on commit 707edb6

Please sign in to comment.