priduck-color-theme-cli-js/Justfile

30 lines
824 B
Makefile

export DEBUG := "*"
@default:
just --choose
# Format all the source code
format:
treefmt
just --fmt --unstable
prettier src/*.mjs --write
# Generate all the files
build: colors examples
# Generate dist/colors.css
colors: format
node src/cli.mjs css variables --output colors.css --selector :root
prettier colors.css --write
# Generate examples/theme.css
examples: format
node src/cli.mjs css mixin \
--selector :root \
--output examples/theme.css \
--light examples/light.css \
--light-more-contrast examples/light-more-contrast.css \
--light-less-contrast examples/light-less-contrast.css \
--dark examples/dark.css \
--dark-more-contrast examples/dark-more-contrast.css \
--dark-less-contrast examples/dark-less-contrast.css