make now just calls sass builder
This commit is contained in:
parent
de35db1a9a
commit
b3fb0b07e8
@ -2,6 +2,9 @@ BUILD=cargo build
|
|||||||
build:
|
build:
|
||||||
$(BUILD)
|
$(BUILD)
|
||||||
|
|
||||||
|
css:
|
||||||
|
sh scripts/build-sass.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
|
18
server/scripts/build-sass.sh
Executable file
18
server/scripts/build-sass.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# This script is intended to be called by make ngl
|
||||||
|
|
||||||
|
# Building all the ass because this is a massive fucking pain in make
|
||||||
|
|
||||||
|
build_dir="static/css"
|
||||||
|
sass_dir="static/sass"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
echo Building $1 css in $build_dir/$1.css
|
||||||
|
sass "$sass_dir/$1.scss" "$build_dir/$1.css"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build each thing because sass blows
|
||||||
|
for sf in $sass_dir/*;do
|
||||||
|
b=`basename $sf`
|
||||||
|
sass "$sf" "$build_dir/${b%.*}.css"
|
||||||
|
done
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
build_dir="static/css"
|
|
||||||
sass_dir="static/sass"
|
|
||||||
|
|
||||||
if [ ! -d $build_dir ]; then
|
|
||||||
mkdir -p $build_dir
|
|
||||||
fi
|
|
||||||
|
|
||||||
login="login"
|
|
||||||
|
|
||||||
build() {
|
|
||||||
echo Building $1 css in $build_dir/$1.css
|
|
||||||
sass "$sass_dir/$1.scss" "$build_dir/$1.css"
|
|
||||||
}
|
|
||||||
|
|
||||||
_flags() {
|
|
||||||
echo '-b FILE : build css from sass'
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$1" ];then
|
|
||||||
_flags
|
|
||||||
fi
|
|
||||||
|
|
||||||
while getopts ":b:" opt; do
|
|
||||||
case $opt in
|
|
||||||
b) build $2;;
|
|
||||||
esac
|
|
||||||
done
|
|
Loading…
Reference in New Issue
Block a user