From dd434575b848f8b1cda48639e1b1f2eaa1f625e5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 1 Aug 2024 23:09:06 +0200 Subject: [PATCH] feat: added npm install script Useful for dev environments for quick install --- container/install-npm.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 container/install-npm.sh diff --git a/container/install-npm.sh b/container/install-npm.sh new file mode 100644 index 0000000..ea68fdd --- /dev/null +++ b/container/install-npm.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "Starting theme building process..." + +# Install +apt update +apt install -y ca-certificates curl gnupg +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + +NODE_MAJOR=22 +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list + +apt update +apt install nodejs -y + +# Build config +npm config set cache /tmp --global + +echo "Done!" \ No newline at end of file