-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa3258a
commit 425a6c3
Showing
1 changed file
with
18 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
#!/bin/sh | ||
cd "$(dirname "$0")" || exit | ||
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 | ||
|
||
node scripts/check-package-installed.js postcss sass autoprefixer || exit | ||
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 | ||
npx sass resources:sass_processed | ||
npx postcss sass_processed/style.css sass_processed/martor-description.css sass_processed/select2-dmoj.css --verbose --use autoprefixer -d $2 | ||
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' | ||
build_style 'dark' 'resources/dark' |