summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-12-02 15:55:38 +0100
committerTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-12-02 15:55:40 +0100
commit577f8b620fe8407bc7b97ef3525d525278e13f8d (patch)
tree037c3b72c1149cb079ea688002aeacfd44eaeb2f
parent8a505cc009ecf55d6f8bfa0a724463cd5b666014 (diff)
downloadmullvadvpn-npm-ignore-scripts-experiment.tar.xz
mullvadvpn-npm-ignore-scripts-experiment.zip
Add pre and post install shell scripts to replace npm lifecycle scriptsnpm-ignore-scripts-experiment
-rw-r--r--desktop/post-install.sh26
-rw-r--r--desktop/pre-install.sh12
2 files changed, 38 insertions, 0 deletions
diff --git a/desktop/post-install.sh b/desktop/post-install.sh
new file mode 100644
index 0000000000..7ac23cc6d2
--- /dev/null
+++ b/desktop/post-install.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Install electron
+pushd node_modules/electron
+npm run postinstall
+popd
+
+# Install grpc-tools
+pushd node_modules/grpc-tools
+npm run install
+popd
+
+# Build our own package: management interface
+pushd packages/management-interface
+npm run postinstall
+popd
+
+# Build our own package: nseventforwarder
+pushd packages/nseventforwarder
+npm run postinstall
+popd
+
+# Build our own package: windows-utils
+pushd packages/windows-utils
+npm run postinstall
+popd
diff --git a/desktop/pre-install.sh b/desktop/pre-install.sh
new file mode 100644
index 0000000000..2ab5828f14
--- /dev/null
+++ b/desktop/pre-install.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Configure npm
+npm config set ignore-scripts true
+
+# Install node dependencies
+npm ci
+
+# Create node_modules folder in mullvad-vpn
+pushd packages/mullvad-vpn
+test -d node_modules || mkdir node_modules
+popd