-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: theming script * docs: theming
Showing
3 changed files
with
50 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/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=20 | ||
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 | ||
npm ci --omit dev | ||
npm config set cache /tmp --global | ||
su www-data -s /usr/bin/npm run build | ||
|
||
# Cleanup | ||
npm cache clean --force | ||
apt purge curl gnupg nodejs -y | ||
apt autoremove -y | ||
rm -r /etc/apt/sources.list.d/nodesource.list | ||
rm -r /etc/apt/keyrings/nodesource.gpg | ||
|
||
rm -rf /app/node_modules/ | ||
|
||
echo "Theme building process complete. Cleaned up all dependecies to save space." |