Skip to content

Commit d952455

Browse files
Merge pull request #2000 from aleksandrychev/ENT-13273
Removed node_modules after build
2 parents e9edf01 + b0bdb64 commit d952455

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

build-scripts/bootstrap-tarballs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ log_debug "Installing javascript npm dependencies..."
137137
run_and_print_on_failure npm ci --prefix "$BASEDIR"/mission-portal/public/scripts/
138138
# build react components
139139
run_and_print_on_failure npm run build --prefix "$BASEDIR"/mission-portal/public/scripts/
140-
# remove the packages specified in devDependencies
141-
run_and_print_on_failure npm prune --omit=dev --prefix "$BASEDIR"/mission-portal/public/scripts/
140+
# remove node_modules since the bundles are already built
141+
run_and_print_on_failure rm -rf "$BASEDIR"/mission-portal/public/scripts/node_modules
142142
fi
143143
)
144144

ci/setup-projects.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ if test -f "mission-portal/public/scripts/package.json"; then
1616
npm ci
1717
# build react components
1818
npm run build
19-
# remove the packages specified in devDependencies
20-
npm prune --omit=dev
19+
# remove node_modules since the bundles are already built
20+
# we do not need them to be presented in the package
21+
rm -rf node_modules
2122
fi
2223
)
2324

packaging/common/cfengine-hub/postinstall.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,10 +997,7 @@ chmod 0700 -R $PREFIX/httpd/htdocs/ldap/config
997997

998998
# changed permissions and owner of PHP and JS dependencies
999999
chown root:$MP_APACHE_USER -R $PREFIX/httpd/htdocs/vendor
1000-
chown root:$MP_APACHE_USER -R $PREFIX/httpd/htdocs/public/scripts/node_modules
1001-
10021000
chmod -R ug=rX,o= $PREFIX/httpd/htdocs/vendor # 440 for files, 550 for dirs
1003-
chmod -R ug=rX,o= $PREFIX/httpd/htdocs/public/scripts/node_modules
10041001

10051002
##
10061003
# Start Apache server (and php-fpm if present)

0 commit comments

Comments
 (0)