1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 19:44:21 +00:00
bluelib/dist/_build.sh

41 lines
700 B
Bash
Raw Normal View History

2022-02-21 03:54:35 +00:00
#!/bin/bash
2022-02-21 04:37:33 +00:00
# Maybe a Makefile would be better...
2022-02-21 03:54:35 +00:00
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