Skip to content

Commit

Permalink
Issue 50842 - Decrease 389-console Cockpit component size
Browse files Browse the repository at this point in the history
Description: Our Web UI source files are too big and
we should make it compact for the production.
Compress and decrease the size of the files that are generated by webpack.
Fix rpm.mk so it delivers RPMs only with production-ready result files
(we can skip js.map because it is used only for development)
Also, fix minor audit-ci issues.

https://pagure.io/389-ds-base/issue/50842

Reviewed by: mreynolds (Thanks!)
  • Loading branch information
droideck committed Jan 22, 2020
1 parent b8f99b7 commit ed29ead
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 69 deletions.
7 changes: 5 additions & 2 deletions rpm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,19 @@ install-node-modules:
cd src/cockpit/389-console; make -f node_modules.mk install

build-cockpit: install-node-modules
cd src/cockpit/389-console; make -f node_modules.mk build-cockpit-plugin
cd src/cockpit/389-console; \
NODE_ENV=production make -f node_modules.mk build-cockpit-plugin
cd src/cockpit/389-console; rm -rf cockpit_dist/index.min.js.map

dist-bz2: install-node-modules download-cargo-dependencies
cd src/cockpit/389-console; \
rm -rf cockpit_dist; \
make -f node_modules.mk build-cockpit-plugin; \
NODE_ENV=production make -f node_modules.mk build-cockpit-plugin; \
mv node_modules node_modules.release; \
touch cockpit_dist/*
mkdir -p $(NODE_MODULES_TEST)
touch -r src/cockpit/389-console/package.json $(NODE_MODULES_TEST)
cd src/cockpit/389-console; rm -rf cockpit_dist/index.min.js.map
tar cjf $(GIT_TAG).tar.bz2 --transform "s,^,$(GIT_TAG)/," $$(git ls-files) src/cockpit/389-console/cockpit_dist/ src/cockpit/389-console/node_modules
cd src/cockpit/389-console; \
rm -rf node_modules; \
Expand Down
Loading

0 comments on commit ed29ead

Please sign in to comment.