Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Makefile to replicate CI #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}