Skip to content

Commit

Permalink
rdrf #2260 reverted build script changes
Browse files Browse the repository at this point in the history
  • Loading branch information
id2359 committed Nov 4, 2022
1 parent 0cfa8e8 commit 298f866
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
7 changes: 3 additions & 4 deletions rdrf/rdrf/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@
},
"scripts": {
"start": "react-scripts start",
"prebuild": "./prebuild.sh",
"build": "BUILD_PATH='/frontendbuild/build' react-scripts build",
"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' /frontendbuild/build/static/js/*.js && renamer --find '/runtime(.*)/' --replace 'runtime-bundle.min.js' /frontendend/build/static/js/*.js && renamer --find '/^\\d(.*)/' --replace 'vendors-bundle.min.js' /frontendbuild/build/static/js/*.js ",
"build-rename-css": "renamer --find '/main(.*)/' --replace 'main.css' /frontendbuild/build/static/css/*.css && renamer --find '/^\\d(.*)/' --replace 'vendors.css' /frontendbuild/build/static/css/*.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 ",
"lint": "tslint 'src/**/*.ts{,x}'",
"watch": "npm-watch"
},
Expand Down
15 changes: 5 additions & 10 deletions rdrf/rdrf/frontend/postbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ echo '1/2 Remove the hash from the generated CSS/JS file'
yarn run build-rename

echo '2/2 Copy build files into'

SRC=/frontendbuild/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/
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/
3 changes: 0 additions & 3 deletions rdrf/rdrf/frontend/prebuild.sh

This file was deleted.

0 comments on commit 298f866

Please sign in to comment.