mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
98c755706a
Also update the gitignore for select2-dmoj.css.
28 lines
686 B
Bash
Executable File
28 lines
686 B
Bash
Executable File
#!/bin/sh
|
|
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
|
|
|
|
cd "$(dirname "$0")" || exit
|
|
|
|
build_style() {
|
|
echo "Creating $1 style..."
|
|
cp resources/vars-$1.scss resources/vars.scss
|
|
sass resources:sass_processed
|
|
postcss sass_processed/style.css sass_processed/martor-description.css sass_processed/select2-dmoj.css --verbose --use autoprefixer -d $2
|
|
}
|
|
|
|
build_style 'default' 'resources'
|
|
build_style 'dark' 'resources/dark'
|