mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
40 lines
700 B
Bash
Executable file
40 lines
700 B
Bash
Executable file
#!/bin/bash
|
|
# Maybe a Makefile would be better...
|
|
|
|
echo "Finding targets..."
|
|
targets=$(ls ../src/targets/*.less)
|
|
echo "Targets:"
|
|
echo "$targets"
|
|
echo
|
|
|
|
echo "Finding themes..."
|
|
themes=$(ls ../src/themes/*.less)
|
|
echo "Themes:"
|
|
echo "$themes"
|
|
echo
|
|
|
|
for target in $targets
|
|
do
|
|
for theme in $themes
|
|
do
|
|
|
|
btarget=$(basename $target .less)
|
|
btheme=$(basename $theme .less)
|
|
# Dot notation is used so .module.css files can be generated
|
|
base="$btheme.$btarget"
|
|
|
|
echo "Building $base with the following rules:"
|
|
|
|
tee "$base.less" << EOF
|
|
@import (less) "../src/utils/mixins.less";
|
|
@import (less) "$target";
|
|
@import (less) "$theme";
|
|
EOF
|
|
|
|
lessc "$base.less" "$base.css" --source-map="$base.css.map"
|
|
|
|
echo
|
|
|
|
done
|
|
done
|
|
|