1
0
Fork 0
mirror of synced 2024-06-27 02:20:35 +12:00
budibase/scripts/removeWorkspaceDependencies.sh

17 lines
630 B
Bash
Raw Normal View History

#!/bin/sh
2023-10-03 22:02:11 +13:00
2023-10-19 03:06:32 +13:00
packages_to_remove="@budibase/backend-core @budibase/bbui @budibase/builder @budibase/cli @budibase/client @budibase/frontend-core @budibase/pro @budibase/sdk @budibase/server @budibase/shared-core @budibase/string-templates @budibase/types @budibase/worker"
2023-10-03 22:02:11 +13:00
package_json_path="$1"
2023-10-03 05:18:42 +13:00
2023-10-03 20:34:35 +13:00
process_package() {
pkg_path="$1"
2023-10-03 05:18:42 +13:00
for package_name in $packages_to_remove; do
jq "del(.dependencies[\"$package_name\"])" $pkg_path > tmp_file.json && mv tmp_file.json $pkg_path
jq "del(.resolutions[\"$package_name\"])" $pkg_path > tmp_file.json && mv tmp_file.json $pkg_path
2023-10-14 00:59:42 +13:00
done
2023-10-03 20:34:35 +13:00
}
2023-10-03 05:18:42 +13:00
process_package "$package_json_path"