Skip to content

Commit a7191cb

Browse files
authored
Merge pull request #77 from webmachinelearning/add-makefile
Adds a Makefile to improve Bikeshed quality of life.
2 parents 66f71da + cd5554b commit a7191cb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# make Generate index.html from index.bs
2+
# make lint Check index.bs for warnings and errors
3+
# make watch Regenerate index.html after any change to index.bs
4+
5+
LOCAL_BIKESHED := $(shell command -v bikeshed 2> /dev/null)
6+
7+
index.html: index.bs
8+
ifndef LOCAL_BIKESHED
9+
curl https://api.csswg.org/bikeshed/ -f -F file=@$< >$@;
10+
else
11+
bikeshed spec
12+
endif
13+
14+
ifdef LOCAL_BIKESHED
15+
.PHONY: lint watch
16+
17+
lint: index.bs
18+
bikeshed --print=plain --dry-run --die-when=late --line-numbers spec $<
19+
20+
watch: index.bs
21+
@echo 'Browse to file://${PWD}/index.html'
22+
bikeshed --print=plain watch $<
23+
endif # LOCAL_BIKESHED

0 commit comments

Comments
 (0)