Skip to content

Commit 61ea55d

Browse files
authored
Merge pull request #2705 from zarahzachz/documentation-fixes
docs: fix grammar and spelling errors in documentation.
2 parents 834a383 + b457b5b commit 61ea55d

File tree

14 files changed

+26
-23
lines changed

14 files changed

+26
-23
lines changed

docs/docs/building/polyfills-loader.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ For your application code, we recommend using `preload` (or `modulepreload` when
4444
```html
4545
<head>
4646
<link rel="preload" href="./app.js" />
47-
<!-- for module scripts, add a corrs attribute -->
47+
<!-- for module scripts, add a cors attribute -->
4848
<link rel="preload" href="./app.js" crossorigin="anonymous" />
4949
</head>
5050
```
@@ -141,7 +141,7 @@ const config = {
141141

142142
## polyfills
143143

144-
The polyfills config controls which polyills are injected onto the page. These are the possible polyfills:
144+
The polyfills config controls which polyfills are injected onto the page. These are the possible polyfills:
145145

146146
- [coreJs](https://github.com/zloirock/core-js)
147147
- [regeneratorRuntime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime)

docs/docs/building/rollup-plugin-html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export default {
242242

243243
### Minification
244244

245-
Set the minify option to do default HTML minificiation. If you need custom options, you can implement your own minifier using the `transformHtml` option.
245+
Set the minify option to do default HTML minification. If you need custom options, you can implement your own minifier using the `transformHtml` option.
246246

247247
```js
248248
import { rollupPluginHTML as html } from '@web/rollup-plugin-html';

docs/docs/building/rollup-plugin-import-meta-assets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Default: `null`
8888
By default, referenced assets detected by this plugin are just copied as is to the output directory, according to your configuration.
8989
9090
When `transform` is defined, this function will be called for each asset with two parameters, the content of the asset as a [Buffer](https://nodejs.org/api/buffer.html) and the absolute path.
91-
This allows you to conditionnaly match on the absolute path and maybe transform the content.
91+
This allows you to conditionally match on the absolute path and maybe transform the content.
9292
9393
When `transform` returns `null`, the asset is skipped from being processed.
9494

docs/docs/dev-server/cli-and-configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ interface DevServerConfig {
8686
open?: 'string' | boolean;
8787
// index HTML to use for SPA routing / history API fallback
8888
appIndex?: string;
89-
// reload the brower on file changes.
89+
// reload the browser on file changes.
9090
watch?: boolean;
9191
// resolve bare module imports
9292
nodeResolve?: boolean | RollupNodeResolveOptions;

docs/docs/dev-server/plugins/esbuild.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The `auto-always` option looks at the user agent, but doesn't skip the latest ve
7676

7777
### Browser and language target
7878

79-
The target option can be set to one or more browser or language targetversions, for example `chrome80` or `es2020`. The property can be an array, so you can set multiple browser targets. While the auto target options are specific to this plugin, the browser and language target come directly from esbuild. [Check the docs](https://github.com/evanw/esbuild) for more information.
79+
The target option can be set to one or more browser or language target versions, for example `chrome80` or `es2020`. The property can be an array, so you can set multiple browser targets. While the auto target options are specific to this plugin, the browser and language target come directly from esbuild. [Check the docs](https://github.com/evanw/esbuild) for more information.
8080

8181
### No target
8282

docs/docs/test-runner/browser-launchers/browserstack.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Install the package:
1212
npm i --save-dev @web/test-runner-browserstack
1313
```
1414

15-
Add the browser launcher to your `web-test-runner.confg.mjs`:
15+
Add the browser launcher to your `web-test-runner.config.mjs`:
1616

1717
```js
1818
import { browserstackLauncher } from '@web/test-runner-browserstack';

docs/docs/test-runner/browser-launchers/saucelabs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Install the package:
1212
npm i --save-dev @web/test-runner-saucelabs
1313
```
1414

15-
Add the browser launcher to your `web-test-runner.confg.mjs`. To set up a local proxy to sauce labs, you first need to create the browser launcher which will share a common connection between all browsers:
15+
Add the browser launcher to your `web-test-runner.config.mjs`. To set up a local proxy to sauce labs, you first need to create the browser launcher which will share a common connection between all browsers:
1616

1717
```js
1818
import { createSauceLabsLauncher } from '@web/test-runner-saucelabs';

docs/docs/test-runner/commands.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ it('natively holds and then releases a key', async () => {
334334

335335
### Select option
336336

337-
The `selectOption` command allows you to select an option in a `<select>` tag by either a single value, a label string or as multiple values, depending on the specific implementations of the browser laucher you're using. Once selected, the native `change` and `input` events are dispatched automatically. The `selectOption` command needs the CSS selector to locate the `<select>` by and the value, label, or values to select. The function is async and should be awaited.
337+
The `selectOption` command allows you to select an option in a `<select>` tag by either a single value, a label string or as multiple values, depending on the specific implementations of the browser launcher you're using. Once selected, the native `change` and `input` events are dispatched automatically. The `selectOption` command needs the CSS selector to locate the `<select>` by and the value, label, or values to select. The function is async and should be awaited.
338338

339339
The three major launchers all have different support for selecting options, and the `selectOption` takes this into account.Attempting to select an option via a method that is not implemented in the provided launcher will produce errors. Each supported launcher's option selection support is documented below.
340340

docs/docs/test-runner/writing-tests/code-coverage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Web Test Runner uses [`v8-to-istanbul`](https://github.com/istanbuljs/v8-to-ista
3535
/* c8 ignore next [line count] */
3636
```
3737

38-
This is somewhat different than other tools where you might have specifically targetted `if` / `else` branches of logic with an ignore statement. Particularly, V8 does not create phantom `else` statements when calculating coverage, so it is likely that you will be able to use less of these statements than in the past.
38+
This is somewhat different than other tools where you might have specifically targeted `if` / `else` branches of logic with an ignore statement. Particularly, V8 does not create phantom `else` statements when calculating coverage, so it is likely that you will be able to use less of these statements than in the past.
3939

4040
In this way, you can skip the rest of a line:
4141

docs/docs/test-runner/writing-tests/html-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ With mocha, you need to define your tests inside the `runTests` function:
2727
</html>
2828
```
2929

30-
You can also go completely barebones and not use any test framework. In this case you are responsible for pinging back to the test runner yourself:
30+
You can also go completely bare bones and not use any test framework. In this case you are responsible for pinging back to the test runner yourself:
3131

3232
```html
3333
<html>

docs/guides/dev-server/using-plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default {
103103

104104
## Babel
105105

106-
When doing buildless development you want compilers to be as fast as possible. That's why we recommend esbuild for common transformatons like TS, JSX, and modern JS. [See our guide](./typescript-and-jsx.md) to learn more about how to set this up.
106+
When doing buildless development you want compilers to be as fast as possible. That's why we recommend esbuild for common transformations like TS, JSX, and modern JS. [See our guide](./typescript-and-jsx.md) to learn more about how to set this up.
107107

108108
If you need to use babel because of a specific plugin, you can use `@rollup/plugin-babel`. In this example we use babel with the JSX plugin for preact:
109109

docs/guides/going-buildless/es-modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Many libraries are already shipping es module variants, but you need to do some
140140
import foo from 'foo/dist/foo.mjs';
141141
```
142142
143-
Inspect your `node_modules` folder to see if you can find it, or check the docs if thas been documented.
143+
Inspect your `node_modules` folder to see if you can find it, or check the docs if that's been documented.
144144
145145
### Ask the author to distribute an ESM distribution
146146

docs/guides/test-runner/code-coverage/index.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function calc(type, a, b) {
4444
```
4545

4646
And while we are at it we can also add `minus`, I'm sure that will come in handy that at some point as well.
47-
And if we provide a wrong type we should throw an error - better let the user know whats up.
47+
And if we provide a wrong type we should throw an error - better let the user know what's up.
4848

4949
👉 `src/calc.js`
5050

@@ -74,7 +74,7 @@ View full coverage report at coverage/lcov-report/index.html
7474
Finished running tests in 1s, all tests passed! 🎉
7575
```
7676

77-
As you can see, our test passed but our `Code coverage` is a bit on the low side.
77+
As you can see, our test passed but our code coverage is a bit on the low side.
7878

7979
## What to test
8080

@@ -103,7 +103,7 @@ Adding a test for throwing an error will bring it to `100%`.
103103
## Adding more features
104104

105105
Let's add the possibility to `multiply`.
106-
While implementing `Lea` said it's time for a meeting so we put `return; // finish later` for now.
106+
While implementing, Lea said it's time for a meeting so we put `return; // finish later` for now.
107107

108108
👉 `src/calc.js`
109109

@@ -149,11 +149,12 @@ View full coverage report at coverage/lcov-report/index.html
149149
Finished running tests in 1s, all tests passed! 🎉
150150
```
151151

152-
uh nice `100%` - but it feels fishy? didn't we have a `finish later` somewhere?
152+
Uh, nice `100%` - but it feels fishy? Didn't we have a `finish later` somewhere?
153153

154154
## How come we have 100% code coverage?
155155

156-
Lets first try to understand how code coverage works
156+
Let's first try to understand how code coverage works.
157+
157158
The way code coverage gets measured is by applying a form of instrumentation. In short, before our code is executed it gets changed (instrumented) and it behaves something like this:
158159

159160
```js
@@ -162,7 +163,7 @@ if (this.value === 'cat') {
162163
console.log('We like cats too :)');
163164
}
164165

165-
// becomes something like this (psoido code)
166+
// becomes something like this (pseudo code)
166167
__instrumented['functionUpdate'] += 1;
167168
if (this.value === 'cat') {
168169
__instrumented['functionUpdateBranch1yes'] += 1;
@@ -208,7 +209,7 @@ You should, therefore, see code coverage as a tool that only gives you guidance
208209

209210
## Ignoring uncovered lines
210211

211-
In more complex applications, it is likely that you will find yourself creating difficult, if not impossible, to test branches of functionality. While this can absolutely be a pointer to logic that is worth breaking down into more approachable parts, there will be cases where this is not feasible. If so, you may chose to ignore a line of code by using the `/* c8 ignore next */` custom comment. Using this, or more advanced forms of [ignoring uncovered lines](../../../docs/test-runner/writing-tests/code-coverage.md#ignoring-uncovered-lines) while computing code coverage can go a long way in preparing your project for long term maintanence.
212+
In more complex applications, it is likely that you will find yourself creating difficult, if not impossible, to test branches of functionality. While this can absolutely be a pointer to logic that is worth breaking down into more approachable parts, there will be cases where this is not feasible. If so, you may chose to ignore a line of code by using the `/* c8 ignore next */` custom comment. Using this, or more advanced forms of [ignoring uncovered lines](../../../docs/test-runner/writing-tests/code-coverage.md#ignoring-uncovered-lines) while computing code coverage can go a long way in preparing your project for long term maintenance.
212213

213214
## Coverage browser support
214215

docs/guides/test-runner/typescript.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
If you write your source files in TypeScript, you can test directly from sources without
44
compiling using `tsc`. Add `esbuildPlugin({ ts: true })` to your `web-test-runner.config.js`
55
file.
6+
67
This uses esbuild to [transform TS sources on-the-fly](https://esbuild.github.io/api/#transform-api).
78
[There are some caveats to using esbuild with TypeScript](https://esbuild.github.io/content-types/#typescript-caveats).
9+
810
For example, if you use TypeScript paths to alias imports, you may need to build first.
911

1012
```js
@@ -16,8 +18,8 @@ export default {
1618
};
1719
```
1820

19-
Keep in mind that esbuild merely removes TypeScript syntax and transforms decorators, etc;
20-
It does not provide any type checking, and it's [not intended to](https://esbuild.github.io/faq/#upcoming-roadmap). If you'd like to run `tsc` in parallel, you can use `concurrently` or `npm-run-all`
21+
Keep in mind that esbuild merely removes TypeScript syntax and transforms decorators, etc.;
22+
It does not provide any type checking and it's [not intended to](https://esbuild.github.io/faq/#upcoming-roadmap). If you'd like to run `tsc` in parallel, you can use `concurrently` or `npm-run-all`.
2123

2224
<figure>
2325

@@ -33,4 +35,4 @@ Example: Using `concurrently` to typecheck and test simultaneously
3335

3436
</figure>
3537

36-
Read more about the esbuild plugin in the [docs](../../docs/dev-server/plugins/esbuild.md)
38+
Read more about the esbuild plugin in the [docs](../../docs/dev-server/plugins/esbuild.md).

0 commit comments

Comments
 (0)