You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/contributing.md
+51-26Lines changed: 51 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,24 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
36
36
37
37
- Make sure tests pass!
38
38
39
-
- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
39
+
- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
40
40
41
-
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
41
+
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
42
+
43
+
### Advanced Pull Request Tips
44
+
45
+
- The PR should fix the intended bug **only** and not introduce unrelated changes. This includes unnecessary refactors - a PR should focus on the fix and not code style, this makes it easier to trace changes in the future.
46
+
47
+
- Consider the performance / size impact of the changes, and whether the bug being fixes justifies the cost. If the bug being fixed is a very niche edge case, we should try to minimize the size / perf cost to make it worthwhile.
48
+
49
+
- Is the code perf-sensitive (e.g. in "hot paths" like component updates or the vdom patch function?)
50
+
51
+
- If the branch is dev-only, performance is less of a concern.
52
+
53
+
- Check how much extra bundle size the change introduces.
54
+
- Make sure to put dev-only code in `__DEV__` branches so they are tree-shakable.
55
+
- Runtime code is more sensitive to size increase than compiler code.
56
+
- Make sure it doesn't accidentally cause dev-only or compiler-only code branches to be included in the runtime build. Notable case is that some functions in `@vue/shared` are compiler-only and should not be used in runtime code, e.g. `isHTMLTag` and `isSVGTag`.
42
57
43
58
## Development Setup
44
59
@@ -63,6 +78,8 @@ A high level overview of tools used:
63
78
64
79
**The examples below will be using the `nr` command from the [ni](https://github.com/antfu/ni) package.** You can also use plain `npm run`, but you will need to pass all additional arguments after the command after an extra `--`. For example, `nr build runtime --all` is equivalent to `npm run build -- runtime --all`.
65
80
81
+
The `run-s` and `run-p` commands found in some scripts are from [npm-run-all](https://github.com/mysticatea/npm-run-all) for orchestrating multiple scripts. `run-s` means "run in sequence" while `run-p` means "run in parallel".
82
+
66
83
### `nr build`
67
84
68
85
The `build` script builds all public packages (packages without `private: true` in their `package.json`).
@@ -138,9 +155,17 @@ $ nr dev
138
155
139
156
- The `dev` script supports the `-i` flag for inlining all deps. This is useful when debugging `esm-bundler` builds which externalizes deps by default.
140
157
158
+
### `nr dev-sfc`
159
+
160
+
Shortcut for starting the SFC Playground in local dev mode. This provides the fastest feedback loop when debugging issues that can be reproduced in the SFC Playground.
161
+
162
+
### `nr dev-esm`
163
+
164
+
Builds and watches `vue/dist/vue-runtime.esm-bundler.js` with all deps inlined using esbuild. This is useful when debugging the ESM build in a reproductions that require real build setups: link `packages/vue` globally, then link it into the project being debugged.
165
+
141
166
### `nr dev-compiler`
142
167
143
-
The `dev-compiler` script builds, watches and serves the [Template Explorer](https://github.com/vuejs/core/tree/main/packages/template-explorer) at `http://localhost:5000`. This is extremely useful when working on the compiler.
168
+
The `dev-compiler` script builds, watches and serves the [Template Explorer](https://github.com/vuejs/core/tree/main/packages/template-explorer) at `http://localhost:5000`. This is useful when working on pure compiler issues.
144
169
145
170
### `nr test`
146
171
@@ -208,27 +233,29 @@ This is made possible via several configurations:
There are some rules to follow when importing across package boundaries:
@@ -253,8 +280,6 @@ Test coverage is continuously deployed at https://vue-next-coverage.netlify.app/
253
280
254
281
### Testing Type Definition Correctness
255
282
256
-
This project uses [tsd](https://github.com/SamVerschueren/tsd) to test the built definition files (`*.d.ts`).
257
-
258
283
Type tests are located in the `test-dts` directory. To run the dts tests, run `nr test-dts`. Note that the type test requires all relevant `*.d.ts` files to be built first (and the script does it for you). Once the `d.ts` files are built and up-to-date, the tests can be re-run by simply running `nr test-dts`.
Copy file name to clipboardExpand all lines: BACKERS.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
<h1align="center">Sponsors & Backers</h1>
2
2
3
-
Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [sponsor Vue's development](https://vuejs.org/sponsor/).
3
+
Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [sponsoring Vue's development](https://vuejs.org/sponsor/).
0 commit comments