diff --git a/CHANGELOG.md b/CHANGELOG.md index e7f018ef..fe6051d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # v1.10.1 ## 01/20/2021 -1. [](#bugfix) +1. [](#improved) + * Added `watch.sh` for compiling SCSS with native sass compiler +2. [](#bugfix) * Fixed issue with overlapping sidebar when using fullscreen editor [#2022](https://github.com/getgrav/grav-plugin-admin/issues/2022) # v1.10.0 diff --git a/themes/grav/watch.sh b/themes/grav/watch.sh new file mode 100755 index 00000000..de3654d4 --- /dev/null +++ b/themes/grav/watch.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# +# Configuration +# + +# sass source + +SASS_SOURCE_PATH="scss" + +# sass options +SASS_OPTIONS="--source-map=true --style=nested" + +# css target +CSS_TARGET_PATH="css-compiled" + +# +# Check prerequisites +# +wtfile=$(command -v wt) || { echo "install wellington with 'brew install wellington"; exit 1; } + +# +# Watch folder for changes +# +cd -P `pwd` +$wtfile compile "$SASS_SOURCE_PATH" -b "$CSS_TARGET_PATH" $SASS_OPTIONS +$wtfile watch "$SASS_SOURCE_PATH" -b "$CSS_TARGET_PATH" $SASS_OPTIONS