Skip to content

Commit

Permalink
Locate a copy of icons
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Jul 2, 2023
1 parent 303f167 commit 2ca81fc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -euo pipefail; IFS=$'\n\t'
set -euo pipefail
IFS=$'\n\t'

WD=$(dirname "$0")


if [ ! -f "$WD/oojs-ui/yarn.lock" ]; then
echo 'Installing dependencies'
yarn --cwd "$WD/oojs-ui"
Expand All @@ -13,17 +13,20 @@ echo 'Adding Femiwiki theme'
yarn grunt --gruntfile "$WD/oojs-ui/Gruntfile.js" add-theme --name=Femiwiki --template=WikimediaUI

echo 'Building Femiwiki theme'
cat "$WD/src/femiwiki-base.less" >> "$WD/oojs-ui/node_modules/wikimedia-ui-base/wikimedia-ui-base.less"
cat "$WD/src/femiwiki-base.less" >>"$WD/oojs-ui/node_modules/wikimedia-ui-base/wikimedia-ui-base.less"
find "$WD/"oojs-ui/src/themes/femiwiki/*.json -exec sed -i 's/"#36c"/"#aca7e2"/g' {} \;

echo 'Building OOUI themes'
yarn grunt --gruntfile "$WD/oojs-ui/Gruntfile.js" build

echo 'Moveing Femiwiki Theme to dist'
mkdir -p "$WD/dist/php/" "$WD/dist/resources/"
mkdir -p "$WD/dist/php/" "$WD/dist/resources/" "$WD/dist/femiwiki/images/images"
cp "$WD/oojs-ui/php/themes/FemiwikiTheme.php" "$WD/dist/"
cp "$WD/oojs-ui/dist/oojs-ui-femiwiki.js" "$WD/dist/resources/"
cp "$WD"/oojs-ui/dist/oojs-ui-femiwiki-*.css "$WD/dist/resources/"
cp "$WD"/oojs-ui/dist/oojs-ui-*-femiwiki.css "$WD/dist/resources/"
cp "$WD"/oojs-ui/dist/themes/femiwiki/icons-*.json "$WD/dist/resources/"
cp -r "$WD/oojs-ui/dist/themes/femiwiki/images" "$WD/dist/resources/images/"
cp -r "$WD/oojs-ui/dist/themes/femiwiki/images/icons" "$WD/dist/femiwiki/images/icons"

echo "Done"

0 comments on commit 2ca81fc

Please sign in to comment.