chore: fixes a small typo and prettifies the document (#778)
This commit is contained in:
parent
e828d0b671
commit
1855a7f409
12
.github/contributing.md
vendored
12
.github/contributing.md
vendored
@ -19,10 +19,12 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
|
|||||||
- Checkout a topic branch from a base branch, e.g. `master`, and merge back against that branch.
|
- Checkout a topic branch from a base branch, e.g. `master`, and merge back against that branch.
|
||||||
|
|
||||||
- If adding a new feature:
|
- If adding a new feature:
|
||||||
|
|
||||||
- Add accompanying test case.
|
- Add accompanying test case.
|
||||||
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
||||||
|
|
||||||
- If fixing bug:
|
- If fixing bug:
|
||||||
|
|
||||||
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
|
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
|
||||||
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
||||||
- Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `yarn test --coverage`.
|
- Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `yarn test --coverage`.
|
||||||
@ -73,10 +75,12 @@ yarn build runtime --all
|
|||||||
By default, each package will be built in multiple distribution formats as specified in the `buildOptions.formats` field in its `package.json`. These can be overwritten via the `-f` flag. The following formats are supported:
|
By default, each package will be built in multiple distribution formats as specified in the `buildOptions.formats` field in its `package.json`. These can be overwritten via the `-f` flag. The following formats are supported:
|
||||||
|
|
||||||
- **`global`**:
|
- **`global`**:
|
||||||
|
|
||||||
- For direct use via `<script>` in the browser. The global variable exposed is specified via the `buildOptions.name` field in a package's `package.json`.
|
- For direct use via `<script>` in the browser. The global variable exposed is specified via the `buildOptions.name` field in a package's `package.json`.
|
||||||
- Note: global builds are not [UMD](https://github.com/umdjs/umd) builds. Instead they are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
|
- Note: global builds are not [UMD](https://github.com/umdjs/umd) builds. Instead they are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
|
||||||
|
|
||||||
- **`esm-bundler`**:
|
- **`esm-bundler`**:
|
||||||
|
|
||||||
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (to be replaced by bundler)
|
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (to be replaced by bundler)
|
||||||
- Does not ship a minified build (to be done together with the rest of the code after bundling)
|
- Does not ship a minified build (to be done together with the rest of the code after bundling)
|
||||||
- For use with bundlers like `webpack`, `rollup` and `parcel`.
|
- For use with bundlers like `webpack`, `rollup` and `parcel`.
|
||||||
@ -85,6 +89,7 @@ By default, each package will be built in multiple distribution formats as speci
|
|||||||
- This means you **can** install/import these deps without ending up with different instances of these dependencies
|
- This means you **can** install/import these deps without ending up with different instances of these dependencies
|
||||||
|
|
||||||
- **`esm`**:
|
- **`esm`**:
|
||||||
|
|
||||||
- For usage via native ES modules imports (in browser via `<script type="module">`, or via Node.js native ES modules support in the future)
|
- For usage via native ES modules imports (in browser via `<script type="module">`, or via Node.js native ES modules support in the future)
|
||||||
- Inlines all dependencies - i.e. it's a single ES module with no imports from other files
|
- Inlines all dependencies - i.e. it's a single ES module with no imports from other files
|
||||||
- This means you **must** import everything from this file and this file only to ensure you are getting the same instance of code.
|
- This means you **must** import everything from this file and this file only to ensure you are getting the same instance of code.
|
||||||
@ -114,7 +119,7 @@ Use the `--sourcemap` or `-s` flag to build with source maps. Note this will mak
|
|||||||
|
|
||||||
The `--types` or `-t` flag will generate type declarations during the build and in addition:
|
The `--types` or `-t` flag will generate type declarations during the build and in addition:
|
||||||
|
|
||||||
- Roll the declarations into a single `.dts` file for each package;
|
- Roll the declarations into a single `.d.ts` file for each package;
|
||||||
- Generate an API report in `<projectRoot>/temp/<packageName>.api.md`. This report contains potential warnings emitted by [api-extractor](https://api-extractor.com/).
|
- Generate an API report in `<projectRoot>/temp/<packageName>.api.md`. This report contains potential warnings emitted by [api-extractor](https://api-extractor.com/).
|
||||||
- Generate an API model json in `<projectRoot>/temp/<packageName>.api.json`. This file can be used to generate a Markdown version of the exported APIs.
|
- Generate an API model json in `<projectRoot>/temp/<packageName>.api.json`. This file can be used to generate a Markdown version of the exported APIs.
|
||||||
|
|
||||||
@ -186,7 +191,9 @@ This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) set
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { foo } from '@vue/shared'
|
import { foo } from '@vue/shared'
|
||||||
export const publicFoo = foo as { /* re-define type */ }
|
export const publicFoo = foo as {
|
||||||
|
/* re-define type */
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `vue`: The public facing "full build" which includes both the runtime AND the compiler.
|
- `vue`: The public facing "full build" which includes both the runtime AND the compiler.
|
||||||
@ -208,7 +215,6 @@ This is made possible via several configurations:
|
|||||||
### Package Dependencies
|
### Package Dependencies
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
+---------------------+
|
+---------------------+
|
||||||
| |
|
| |
|
||||||
| @vue/compiler-sfc |
|
| @vue/compiler-sfc |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user