Skip to content

Commit

Permalink
Update Makefile with lint and watch.
Browse files Browse the repository at this point in the history
  • Loading branch information
markafoltz committed Sep 26, 2024
1 parent 6f87bc9 commit 00ab105
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
LOCAL_BIKESHED := $(shell command -v bikeshed 2> /dev/null)

index.html: index.bs
# ./format.py $<
ifndef LOCAL_BIKESHED
curl https://api.csswg.org/bikeshed/ -f -F file=@$< >$@;
else
bikeshed spec
endif

ifdef LOCAL_BIKESHED
.PHONY: lint watch

lint: index.bs
bikeshed --print=plain --dry-run --force spec --line-numbers $<

watch: index.bs
@echo 'Browse to file://${PWD}/index.html'
bikeshed --print=plain watch $<
endif # LOCAL_BIKESHED



0 comments on commit 00ab105

Please sign in to comment.