Skip to content

Commit 83733a4

Browse files
committed
Repository setup
1 parent 7445343 commit 83733a4

File tree

11 files changed

+224
-2385
lines changed

11 files changed

+224
-2385
lines changed

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
index.html -diff merge=ours
2-
spec.js -diff merge=ours
3-
spec.css -diff merge=ours
1+
* text=auto

.github/workflows/build.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
name: Deploy spec
2-
3-
on: [push]
4-
1+
name: Publish Spec to gh-pages
2+
on:
3+
push:
4+
branches: [ main ]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
98
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v1
12-
with:
13-
node-version: '12.x'
14-
- run: npm install
15-
- run: npm run build
16-
- name: commit changes
17-
uses: elstudio/actions-js-build/commit@v3
18-
with:
19-
commitMessage: "fixup: [spec] `npm run build`"
9+
- uses: actions/checkout@v2
10+
- run: npm install
11+
- run: npm run build
12+
- name: Deploy
13+
uses: JamesIves/[email protected]
14+
with:
15+
branch: gh-pages
16+
folder: docs
17+
clean-exclude: |
18+
pr

.github/workflows/pr.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Spec to gh-pages
2+
on:
3+
push:
4+
branches: [ main ]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- run: npm install
11+
- run: npm run build
12+
- name: Deploy
13+
uses: JamesIves/[email protected]
14+
with:
15+
branch: gh-pages
16+
folder: docs
17+
clean-exclude: |
18+
pr

.gitignore

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
6-
# Runtime data
7-
pids
8-
*.pid
9-
*.seed
10-
11-
# Directory for instrumented libs generated by jscoverage/JSCover
12-
lib-cov
13-
14-
# Coverage directory used by tools like istanbul
15-
coverage
16-
17-
# nyc test coverage
18-
.nyc_output
19-
20-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21-
.grunt
22-
23-
# node-waf configuration
24-
.lock-wscript
25-
26-
# Compiled binary addons (http://nodejs.org/api/addons.html)
27-
build/Release
28-
29-
# Dependency directories
301
node_modules
31-
jspm_packages
32-
33-
# Optional npm cache directory
34-
.npm
35-
36-
# Optional REPL history
37-
.node_repl_history
38-
39-
# Only apps should have lockfiles
40-
yarn.lock
41-
package-lock.json
42-
npm-shrinkwrap.json
43-
pnpm-lock.yaml
2+
coverage
3+
docs

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"[markdown]": {
3+
"files.trimTrailingWhitespace": false
4+
}
5+
}

.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "gulp",
8+
"task": "build",
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
}
13+
}
14+
]
15+
}

README.md

Lines changed: 119 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,134 @@
1-
# template-for-proposals
1+
<!--#region:intro-->
2+
# ECMAScript Regular Expression Language Features
23

3-
A repository template for ECMAScript proposals.
4+
<!--#endregion:intro-->
45

5-
## Before creating a proposal
6+
<!--#region:status-->
7+
## Status
68

7-
Please ensure the following:
8-
1. You have read the [process document](https://tc39.github.io/process-document/)
9-
1. You have reviewed the [existing proposals](https://github.com/tc39/proposals/)
10-
1. You are aware that your proposal requires being a member of TC39, or locating a TC39 delegate to "champion" your proposal
9+
**Stage:** 0 \
10+
**Champion:** Ron Buckton (@rbuckton) \
1111

12-
## Create your proposal repo
12+
_For detailed status of this proposal see [TODO](#todo), below._
13+
<!--#endregion:status-->
14+
15+
<!--#region:authors-->
16+
## Authors
17+
18+
* Ron Buckton ([@rbuckton](https://github.com/rbuckton))
19+
<!--#endregion:authors-->
20+
21+
<!--#region:motivations-->
22+
# Motivations
23+
24+
<!--#endregion:motivations-->
25+
26+
<!--#region:prior-art-->
27+
# Prior Art
1328

14-
Follow these steps:
15-
1. Click the green ["use this template"](https://github.com/tc39/template-for-proposals/generate) button in the repo header. (Note: Do not fork this repo in GitHub's web interface, as that will later prevent transfer into the TC39 organization)
16-
1. Go to your repo settings “Options” page, under “GitHub Pages”, and set the source to the **main branch** under the root (and click Save, if it does not autosave this setting)
17-
1. check "Enforce HTTPS"
18-
1. On "Options", under "Features", Ensure "Issues" is checked, and disable "Wiki", and "Projects" (unless you intend to use Projects)
19-
1. Under "Merge button", check "automatically delete head branches"
2029
<!--
21-
1. Avoid merge conflicts with build process output files by running:
22-
```sh
23-
git config --local --add merge.output.driver true
24-
git config --local --add merge.output.driver true
25-
```
26-
1. Add a post-rewrite git hook to auto-rebuild the output on every commit:
27-
```sh
28-
cp hooks/post-rewrite .git/hooks/post-rewrite
29-
chmod +x .git/hooks/post-rewrite
30-
```
30+
- Language: [Feature](#todo)
3131
-->
32-
3. ["How to write a good explainer"][explainer] explains how to make a good first impression.
3332

34-
> Each TC39 proposal should have a `README.md` file which explains the purpose
35-
> of the proposal and its shape at a high level.
36-
>
37-
> ...
38-
>
39-
> The rest of this page can be used as a template ...
33+
<!--#endregion:prior-art-->
34+
35+
<!--#region:syntax-->
36+
# Syntax
37+
38+
```js
39+
```
40+
<!--#endregion:syntax-->
41+
42+
<!--#region:semantics-->
43+
# Semantics
44+
45+
<!--#endregion:semantics-->
46+
47+
<!--#region:examples-->
48+
# Examples
49+
50+
<!--#endregion:examples-->
51+
52+
<!--#region:api-->
53+
<!--
54+
# API
55+
56+
> TODO: Provide description of High-level API.
57+
-->
58+
<!--#endregion:api-->
59+
60+
<!--#region:grammar-->
61+
<!--
62+
# Grammar
63+
64+
> TODO: Provide the grammar for the proposal. Please use [grammarkdown][Grammarkdown] syntax in
65+
> fenced code blocks as grammarkdown is the grammar format used by ecmarkup.
66+
67+
```grammarkdown
68+
```
69+
-->
70+
<!--#endregion:grammar-->
71+
72+
<!--#region:references-->
73+
# References
74+
75+
<!--#endregion:references-->
76+
77+
<!--#region:prior-discussion-->
78+
<!--
79+
# Prior Discussion
80+
81+
> TODO: Provide links to prior discussion topics on https://esdiscuss.org.
82+
83+
* [Subject](https://esdiscuss.org)
84+
-->
85+
<!--#endregion:prior-discussion-->
86+
87+
<!--#region:todo-->
88+
# TODO
89+
90+
The following is a high-level list of tasks to progress through each stage of the [TC39 proposal process](https://tc39.github.io/process-document/):
91+
92+
### Stage 1 Entrance Criteria
93+
94+
* [ ] Identified a "[champion][Champion]" who will advance the addition. \
95+
* [ ] [Prose][Prose] outlining the problem or need and the general shape of a solution. \
96+
* [ ] Illustrative [examples][Examples] of usage. \
97+
* [ ] High-level [API][API]. \
4098

41-
Your explainer can point readers to the `index.html` generated from `spec.emu`
42-
via markdown like
99+
### Stage 2 Entrance Criteria
43100

44-
```markdown
45-
You can browse the [ecmarkup output](https://ACCOUNT.github.io/PROJECT/)
46-
or browse the [source](https://github.com/ACCOUNT/PROJECT/blob/HEAD/spec.emu).
47-
```
101+
* [ ] [Initial specification text][Specification]. \
102+
* [ ] [Transpiler support][Transpiler] (_Optional_). \
48103

49-
where *ACCOUNT* and *PROJECT* are the first two path elements in your project's Github URL.
50-
For example, for github.com/**tc39**/**template-for-proposals**, *ACCOUNT* is "tc39"
51-
and *PROJECT* is "template-for-proposals".
104+
### Stage 3 Entrance Criteria
52105

106+
* [ ] [Complete specification text][Specification]. \
107+
* [ ] Designated reviewers have [signed off][Stage3ReviewerSignOff] on the current spec text. \
108+
* [ ] The ECMAScript editor has [signed off][Stage3EditorSignOff] on the current spec text. \
53109

54-
## Maintain your proposal repo
110+
### Stage 4 Entrance Criteria
55111

56-
1. Make your changes to `spec.emu` (ecmarkup uses HTML syntax, but is not HTML, so I strongly suggest not naming it ".html")
57-
1. Any commit that makes meaningful changes to the spec, should run `npm run build` and commit the resulting output.
58-
1. Whenever you update `ecmarkup`, run `npm run build` and commit any changes that come from that dependency.
112+
* [ ] [Test262](https://github.com/tc39/test262) acceptance tests have been written for mainline usage scenarios and [merged][Test262PullRequest]. \
113+
* [ ] Two compatible implementations which pass the acceptance tests: \
114+
* [ ] [_Pending_][Implementation1] \
115+
* [ ] [_Pending_][Implementation2] \
116+
* [ ] A [pull request][Ecma262PullRequest] has been sent to tc39/ecma262 with the integrated spec text. \
117+
* [ ] The ECMAScript editor has signed off on the [pull request][Ecma262PullRequest]. \
118+
<!--#endregion:todo-->
59119

60-
[explainer]: https://github.com/tc39/how-we-work/blob/HEAD/explainer.md
120+
[Process]: https://tc39.github.io/process-document/
121+
[Proposals]: https://github.com/tc39/proposals/
122+
[Grammarkdown]: http://github.com/rbuckton/grammarkdown#readme
123+
[Champion]: #status
124+
[Prose]: #motivations
125+
[Examples]: #examples
126+
[API]: #api
127+
[Specification]: #todo
128+
[Transpiler]: #todo
129+
[Stage3ReviewerSignOff]: #todo
130+
[Stage3EditorSignOff]: #todo
131+
[Test262PullRequest]: #todo
132+
[Implementation1]: #todo
133+
[Implementation2]: #todo
134+
[Ecma262PullRequest]: #todo

gulpfile.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const del = require("del");
2+
const path = require("path");
3+
const gulp = require("gulp");
4+
const emu = require("gulp-emu");
5+
const gls = require("gulp-live-server");
6+
7+
gulp.task("clean", () => del("docs/**/*"));
8+
9+
gulp.task("build", () => gulp
10+
.src(["spec/index.html"])
11+
.pipe(emu({ ecma262Biblio: false, js: true, css: true }))
12+
.pipe(gulp.dest("docs")));
13+
14+
gulp.task("watch", () => gulp
15+
.watch(["spec/**/*"], gulp.task("build")));
16+
17+
gulp.task("start", gulp.parallel(gulp.task("watch"), () => {
18+
const server = gls.static("docs", 8080);
19+
const promise = server.start();
20+
(/** @type {import("chokidar").FSWatcher}*/(gulp.watch(["docs/**/*"])))
21+
.on("change", file => {
22+
server.notify({ path: path.resolve(file) });
23+
});
24+
return promise;
25+
}));
26+
27+
gulp.task("default", gulp.task("build"));

0 commit comments

Comments
 (0)