mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 11:34:21 +00:00
39 lines
662 B
Bash
Executable file
39 lines
662 B
Bash
Executable file
#!/bin/bash
|
|
|
|
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
|
|
|