Skip to content

Commit

Permalink
Add Makefile to replicate CI
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed Feb 28, 2025
1 parent c0694cb commit 3f2020a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
index.html
node_modules/
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
SHELL := /bin/bash

DST := $(patsubst %.bs,%.html,$(wildcard *.bs))
REMOTE := $(filter remote,$(MAKECMDGOALS))

all: $(DST)
@ echo "All done"

%.html : %.bs node_modules/vnu-jar/build/dist/vnu.jar
ifndef REMOTE
@ echo "Building $@"
bikeshed --die-on=warning spec $< $@
java -jar node_modules/vnu-jar/build/dist/vnu.jar --also-check-css $@
else
@ echo "Building $@ remotely"
@ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \
--output $@ \
--write-out "%{http_code}" \
--header "Accept: text/plain, text/html" \
-F die-on=warning \
-F file=@$<) && \
[[ "$$HTTP_STATUS" -eq "200" ]]) || ( \
echo ""; cat $@; echo ""; \
rm -f index.html; \
exit 22 \
);
endif

node_modules/vnu-jar/build/dist/vnu.jar:
npm install vnu-jar

remote: all

20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "web-speech-api",
"version": "1.0.0",
"description": "This is the source for the [Web Speech API](https://webaudio.github.io/web-speech-api/) spec.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WebAudio/web-speech-api.git"
},
"bugs": {
"url": "https://github.com/WebAudio/web-speech-api/issues"
},
"homepage": "https://github.com/WebAudio/web-speech-api#readme",
"devDependencies": {
"vnu-jar": "^24.10.17"
}
}

0 comments on commit 3f2020a

Please sign in to comment.