Skip to content

Commit 85e6ebf

Browse files
committed
Add more boilerplate to support writing the spec.
This commit was based on: WICG/navigation-api@e35350c
1 parent f6af1ef commit 85e6ebf

File tree

9 files changed

+120
-19
lines changed

9 files changed

+120
-19
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_size = 2
8+
indent_style = space
9+
trim_trailing_whitespace = true
10+
11+
[Makefile]
12+
indent_style = tab

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.bs diff=html linguist-language=HTML

.github/workflow/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Build
16+
run: make ci
17+
- name: Deploy
18+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
19+
uses: peaceiris/actions-gh-pages@v3
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
publish_dir: ./out

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/out/
2+
/spec.html
3+
*.swp

.pr-preview.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"src_file": "spec.bs",
3+
"type": "bikeshed"
4+
}

CONTRIBUTING.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
# Web Platform Incubator Community Group
1+
## Editing the specification
22

3-
This repository is being used for work in the W3C Web Platform Incubator Community Group, governed by the [W3C Community License
4-
Agreement (CLA)](http://www.w3.org/community/about/agreements/cla/). To make substantive contributions,
5-
you must join the CG.
3+
Edits to the specification are done in the `spec.bs` file, which is then compiled with the [Bikeshed](https://tabatkins.github.io/bikeshed/) spec pre-processor.
64

7-
If you are not the sole contributor to a contribution (pull request), please identify all
8-
contributors in the pull request comment.
5+
To build the specification, you can use one of:
96

10-
To add a contributor (other than yourself, that's automatic), mark them one per line as follows:
7+
- `make local`: uses a locally-installed copy of Bikeshed
8+
- `make remote`: uses a Bikeshed web service, so you don't have to install anything locally
9+
10+
## For maintainers: identifying contributors to a pull request
11+
12+
If the author is not the sole contributor to a pull request, please identify all contributors in the pull request comment.
13+
14+
To add a contributor (other than the author, which is automatic), mark them one per line as follows:
1115

1216
```
1317
+@github_username
@@ -19,5 +23,4 @@ If you added a contributor by mistake, you can remove them in a comment with:
1923
-@github_username
2024
```
2125

22-
If you are making a pull request on behalf of someone else but you had no part in designing the
23-
feature, you can remove yourself with the above syntax.
26+
If the author is making a pull request on behalf of someone else but they had no part in designing the feature, you can remove them with the above syntax.

LICENSE.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
All Reports in this Repository are licensed by Contributors
2-
under the
3-
[W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
4-
5-
Contributions to Specifications are made under the
6-
[W3C CLA](https://www.w3.org/community/about/agreements/cla/).
7-
8-
Contributions to Test Suites are made under the
9-
[W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html)
10-
1+
All Reports in this Repository are licensed by Contributors under the [W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
2+
Contributions to Specifications are made under the [W3C CLA](https://www.w3.org/community/about/agreements/cla/).
3+
Contributions to Test Suites are made under the [W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html).

Makefile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
SHELL=/bin/bash
2+
3+
local: spec.bs
4+
bikeshed --die-on=warning spec spec.bs spec.html
5+
6+
spec.html: spec.bs
7+
@ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \
8+
--output spec.html \
9+
--write-out "%{http_code}" \
10+
--header "Accept: text/plain, text/html" \
11+
-F die-on=warning \
12+
13+
[[ "$$HTTP_STATUS" -eq "200" ]]) || ( \
14+
echo ""; cat spec.html; echo ""; \
15+
rm -f spec.html; \
16+
exit 22 \
17+
);
18+
19+
remote: spec.html
20+
21+
ci: spec.bs
22+
mkdir -p out
23+
make remote
24+
mv spec.html out/index.html
25+
26+
clean:
27+
rm spec.html

spec.bs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<pre class="metadata">
2+
Title: URLPattern API
3+
Shortname: urlpattern
4+
Repository: WICG/urlpattern
5+
Inline Github Issues: true
6+
Group: WICG
7+
Status: CG-DRAFT
8+
Level: 1
9+
URL: https://wicg.github.io/urlpattern/
10+
Boilerplate: omit conformance, omit feedback-header
11+
Editor: Ben Kelly, Google https://www.google.com/, [email protected]
12+
Abstract: The URLPattern API provides a web platform primitive for matching URLs based on a convenient pattern syntax.
13+
!Participate: <a href="https://github.com/WICG/urlpattern">GitHub WICG/urlpattern</a> (<a href="https://github.com/WICG/urlpattern/issues/new">new issue</a>, <a href="https://github.com/WICG/urlpattern/issues?state=open">open issues</a>)
14+
!Commits: <a href="https://github.com/WICG/urlpattern/commits/master/spec.bs">GitHub spec.bs commits</a>
15+
Complain About: accidental-2119 yes, missing-example-ids yes
16+
Indent: 2
17+
Default Biblio Status: current
18+
Markup Shorthands: markdown yes
19+
</pre>
20+
21+
<style>
22+
.selected-text-file-an-issue {
23+
position: fixed;
24+
bottom: 0;
25+
right: 0;
26+
background: rgba(255, 255, 255, 0.8);
27+
font-size: smaller;
28+
padding: 4px 10px;
29+
z-index: 4;
30+
}
31+
</style>
32+
33+
<script src="https://resources.whatwg.org/file-issue.js" async></script>
34+
35+
TODO write some spec text!

0 commit comments

Comments
 (0)