mirror of
https://github.com/dnote/dnote
synced 2026-03-15 23:15:50 +01:00
24 lines
388 B
Bash
Executable file
24 lines
388 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# build.sh builds styles
|
|
set -ex
|
|
|
|
dir=$(dirname "${BASH_SOURCE[0]}")
|
|
serverDir="$dir/../.."
|
|
outputDir="$serverDir/static"
|
|
inputDir="$dir/src"
|
|
|
|
rm -rf "${outputDir:?}/*"
|
|
|
|
sass --version
|
|
|
|
task="sass \
|
|
--style compressed \
|
|
--source-map \
|
|
$inputDir:$outputDir"
|
|
|
|
# compile first then watch
|
|
eval "$task"
|
|
|
|
if [[ "$1" == "true" ]]; then
|
|
eval "$task --watch --poll"
|
|
fi
|