appimage: remove node_modules from appdir

The node modules do not need to be deliverer with the appimage. Removing
them from the AppDir saves 50MB.
This commit is contained in:
Mike Salvatore 2021-04-20 20:18:22 -04:00
parent 78ca2c25b1
commit 408a0de4f0
1 changed files with 14 additions and 6 deletions

View File

@ -179,13 +179,21 @@ generate_ssl_cert() {
}
build_frontend() {
pushd "$ISLAND_PATH/cc/ui" || handle_error
npm install sass-loader node-sass webpack --save-dev
npm update
pushd "$ISLAND_PATH/cc/ui" || handle_error
npm install sass-loader node-sass webpack --save-dev
npm update
log_message "Generating front end"
npm run dist
popd || handle_error
log_message "Generating front end"
npm run dist
popd || handle_error
remove_node_modules
}
remove_node_modules() {
# Node has served its purpose. We don't need to deliver the node modules with
# the AppImage.
rm -rf "$ISLAND_PATH"/cc/ui/node_modules
}
add_monkey_icon() {