site/css/Makefile

28 lines
663 B
Makefile
Raw Normal View History

lessc := node_modules/.bin/lessc
lightserver := node_modules/.bin/light-server
2018-11-20 00:08:30 +00:00
NPM != command -v npm 2> /dev/null
2018-11-20 00:08:30 +00:00
.PHONY: dev clean
2018-11-20 00:08:30 +00:00
build: hacker.css dracula.css
dev: build
$(lightserver) -s . -p 9000 -w "index.html, **/*.less \# make" -o
%.css: node_modules less/*.less
2022-02-09 18:39:49 +00:00
$(info building $@:)
2020-06-15 14:05:28 +00:00
$(lessc) less/$*.less $*.css --clean-css="--s1 --advanced --compatibility=ie8"
2018-11-20 00:08:30 +00:00
node_modules: package.json package-lock.json Makefile
ifndef NPM
$(error Missing dependency 'npm'. Please install and try again.)
endif
$(NPM) install
touch node_modules # fixes watch bug if you manually ran npm install
2018-11-20 00:08:30 +00:00
clean:
rm -rf node_modules
rm dracula.css
rm hacker.css