2023-09-17 10:47:32 +08:00
|
|
|
#!/bin/sh
|
2019-09-03 05:18:15 +08:00
|
|
|
if ! [ -x "$(command -v sass)" ]; then
|
|
|
|
echo 'Error: sass is not installed.' >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v postcss)" ]; then
|
|
|
|
echo 'Error: postcss is not installed.' >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v autoprefixer)" ]; then
|
|
|
|
echo 'Error: autoprefixer is not installed.' >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-12-12 19:41:21 +08:00
|
|
|
cd "$(dirname "$0")" || exit
|
2022-12-11 14:05:28 +08:00
|
|
|
|
2022-12-13 10:17:26 +08:00
|
|
|
build_style() {
|
|
|
|
echo "Creating $1 style..."
|
|
|
|
cp resources/vars-$1.scss resources/vars.scss
|
|
|
|
sass resources:sass_processed
|
2023-02-06 09:46:46 +08:00
|
|
|
postcss sass_processed/style.css sass_processed/martor-description.css sass_processed/select2-dmoj.css --verbose --use autoprefixer -d $2
|
2022-12-13 10:17:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build_style 'default' 'resources'
|
|
|
|
build_style 'dark' 'resources/dark'
|