Skip to content

Commit 820a573

Browse files
committed
Merge branch 'master' into sfc-to-fc
2 parents 4fb66fb + 017b6e5 commit 820a573

37 files changed

+9344
-8630
lines changed
File renamed without changes.

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ jspm_packages
3737
.node_repl_history
3838

3939
temp/
40+
playground/dist

Diff for: CONTRIBUTING.md

+23-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
# Contributing Guide
2+
3+
## General
24
1. Make sure you have read and understand the **Goals** section to be aligned with project goals.
35
2. Before submitting a PR please comment in the relevant issue (or create a new one if it doesn't exist yet) to discuss all the requirements (this will prevent rejecting the PR and wasting your work).
4-
3. All workflow scripts (prettier, linter, tests) must pass successfully.
5-
4. Don't edit `README.md` directly - it is built using `sh ./generate.sh` script to inject code snippets from the sources in the `/playground` folder (this will make sure all code examples are nicely formatted and working)
6-
- To make changes in `README.md` edit `.md` files that are located in the `/docs/markdown` folder
7-
- To make changes in code snippets edit source files in `/playground` folder
8-
- include directives look like this: `::[example|usage]='../../playground/src/components/sfc-counter.tsx'::`
9-
5. When submitting a PR please make sure that you run the following:
10-
```bash
11-
# run linter in `/playground` folder
12-
npm run lint
6+
3. All workflow scripts (prettier, linter, tests) must pass successfully (it is run automatically on CI and will fail on github checks).
7+
8+
## PR Checklist
9+
- generate a new `README.md` from `README_SOURCE.md` using command:
10+
```
11+
sh ./generate-readme.sh
1312
14-
# run type-checking in `/playground` folder
15-
npm run tsc
13+
# or if you don't like bash, simply use node.js
14+
# node ./generate-readme.js
15+
```
16+
17+
## `README.md` and `README_SOURCE.md`
18+
Don't edit `README.md` directly - it is generated automatically from `README_SOURCE.md` using script.
19+
- Use `sh ./generate-readme.sh` script to generate updated `README.md` (this will inject code examples using type-checked source files from the `/playground` folder)
20+
- So to make changes in code examples edit source files in `/playground` folder
21+
22+
**Source code inject directives:**
23+
```
24+
# Inject code block with highlighter
25+
::codeblock='playground/src/components/sfc-counter.tsx'::
1626
17-
# always re-generate `README.md` from root folder
18-
sh ./generate.sh
19-
# don't like bash scripts? simply use node.js script
20-
# node ./generator/bin/generate-readme.js
27+
# Inject code block with highlighter and expander
28+
::expander='playground/src/components/sfc-counter.usage.tsx'::
2129
```

0 commit comments

Comments
 (0)