Skip to content

Commit

Permalink
rdrf #2260 upgrade to react-scripts 5.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
id2359 committed Nov 2, 2022
1 parent 1859ee2 commit f5ee8bc
Show file tree
Hide file tree
Showing 12 changed files with 5,360 additions and 75,310 deletions.
4 changes: 3 additions & 1 deletion Dockerfile-node
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Container used to build rdrf frontend
FROM node:10.16.3
#FROM node:10.16.3
FROM node:18.12.0
MAINTAINER https://github.com/muccg/rdrf

RUN env | sort
Expand All @@ -8,6 +9,7 @@ COPY docker-entrypoint-node.sh /app/docker-entrypoint-node.sh

VOLUME ["/data"]

USER node
ENV HOME /data
WORKDIR /data

Expand Down
9 changes: 5 additions & 4 deletions rdrf/rdrf/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"react-dom": "^16.13.0",
"react-icons": "^3.9.0",
"react-redux": "^7.2.0",
"react-scripts": "4.0.3",
"react-scripts": "5.0.1",
"reactstrap": "^8.4.1",
"redux": "^4.0.5",
"redux-actions": "^2.6.5",
Expand All @@ -44,13 +44,14 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"prebuild": "./prebuild.sh",
"build": "BUILD_PATH='/data/frontend/build' react-scripts build",
"postbuild": "./postbuild.sh",
"test": "react-scripts test",
"eject": "react-scripts eject",
"build-rename": "npm run build-rename-js && npm run build-rename-css",
"build-rename-js": "renamer --find '/main(.*)/' --replace 'main-bundle.min.js' build/static/js/*.js && renamer --find '/runtime(.*)/' --replace 'runtime-bundle.min.js' build/static/js/*.js && renamer --find '/^\\d(.*)/' --replace 'vendors-bundle.min.js' build/static/js/*.js ",
"build-rename-css": "renamer --find '/main(.*)/' --replace 'main.css' build/static/css/*.css && renamer --find '/^\\d(.*)/' --replace 'vendors.css' build/static/css/*.css ",
"build-rename-js": "renamer --find '/main(.*)/' --replace 'main-bundle.min.js' /data/frontend/build/static/js/*.js && renamer --find '/runtime(.*)/' --replace 'runtime-bundle.min.js' /data/frontend/build/static/js/*.js && renamer --find '/^\\d(.*)/' --replace 'vendors-bundle.min.js' /data/frontend/build/static/js/*.js ",
"build-rename-css": "renamer --find '/main(.*)/' --replace 'main.css' /data/frontend/build/static/css/*.css && renamer --find '/^\\d(.*)/' --replace 'vendors.css' /data/frontend/build/static/css/*.css ",
"lint": "tslint 'src/**/*.ts{,x}'",
"watch": "npm-watch"
},
Expand Down
15 changes: 10 additions & 5 deletions rdrf/rdrf/frontend/postbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ echo '1/2 Remove the hash from the generated CSS/JS file'
yarn run build-rename

echo '2/2 Copy build files into'
cp build/static/js/main-bundle.min.js ../static/proms/js/
cp build/static/js/runtime-bundle.min.js ../static/proms/js/
cp build/static/js/vendors-bundle.min.js ../static/proms/js/
cp build/static/css/main.css ../static/proms/css/
cp build/static/css/vendors.css ../static/proms/css/

SRC=/data/frontend/build/static
DEST=/app/rdrf/rdrf/static/proms

cp $SRC/js/main-bundle.min.js $DEST/js/
cp $SRC/js/runtime-bundle.min.js $DEST/js/
cp $SRC/js/vendors-bundle.min.js $DEST/js/

cp $SRC/css/main.css $DEST/css/
cp $SRC/css/vendors.css $DEST/css/
3 changes: 3 additions & 0 deletions rdrf/rdrf/frontend/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
echo running prebuild
mkdir -p /data/frontend/build
518 changes: 259 additions & 259 deletions rdrf/rdrf/frontend/src/app/app.unit.test.tsx

Large diffs are not rendered by default.

11,279 changes: 5,072 additions & 6,207 deletions rdrf/rdrf/frontend/yarn.lock

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions rdrf/rdrf/static/proms/css/main.css

Large diffs are not rendered by default.

581 changes: 0 additions & 581 deletions rdrf/rdrf/static/proms/js/main-bundle.js

This file was deleted.

137 changes: 0 additions & 137 deletions rdrf/rdrf/static/proms/js/runtime-bundle.js

This file was deleted.

2 changes: 0 additions & 2 deletions rdrf/rdrf/static/proms/js/runtime-bundle.min.js

This file was deleted.

Loading

0 comments on commit f5ee8bc

Please sign in to comment.