Skip to content

Commit c296130

Browse files
authored
chore: fix term cases (#7553)
1 parent 315fd50 commit c296130

File tree

20 files changed

+43
-43
lines changed

20 files changed

+43
-43
lines changed

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you want to use break point and explore code execution you can use the ["Run
2424

2525
2. Click on the "Run and Debug" icon in the activity bar of the editor.
2626

27-
3. Click on the "Javascript Debug Terminal" button.
27+
3. Click on the "JavaScript Debug Terminal" button.
2828

2929
4. It will open a terminal, then go to `packages/playground/xxx` and run `pnpm run dev`.
3030

@@ -229,7 +229,7 @@ The english docs are embedded in the main Vite repo, to allow contributors to wo
229229
1. In order to get all doc files, you first need to clone this repo in your personal account.
230230
2. Keep all the files in `docs/` and remove everything else.
231231

232-
- You should setup your translation site based on all the files in `docs/` folder as a Vitepress project.
232+
- You should setup your translation site based on all the files in `docs/` folder as a VitePress project.
233233
(that said, `package.json` is need).
234234

235235
- Refresh git history by removing `.git` and then `git init`
@@ -238,7 +238,7 @@ The english docs are embedded in the main Vite repo, to allow contributors to wo
238238

239239
- During this stage, you may be translating documents and synchronizing updates at the same time, but don't worry about that, it's very common in translation contribution.
240240

241-
4. Push your commits to your Github repo. you can setup a netlify preview as well.
242-
5. Use [Ryu-cho](https://github.com/vuejs-translations/ryu-cho) tool to setup a Github Action, automatically track English docs update later.
241+
4. Push your commits to your GitHub repo. you can setup a netlify preview as well.
242+
5. Use [Ryu-cho](https://github.com/vuejs-translations/ryu-cho) tool to setup a GitHub Action, automatically track English docs update later.
243243

244244
We recommend talking with others in Vite Land so you find more contributors for your language to share the maintenance work. Once the translation is done, communicate it to the Vite team so the repo can be moved to the official vitejs org in GitHub.

docs/blog/announcing-vite2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The [programmatic API](https://vitejs.dev/guide/api-javascript.html) has also be
3434

3535
### esbuild Powered Dep Pre-Bundling
3636

37-
Since Vite is a native ESM dev server, it pre-bundles dependencies to reduce the number browser requests and handle CommonJS to ESM conversion. Previously Vite did this using Rollup, and in 2.0 it now uses `esbuild` which results in 10-100x faster dependency pre-bundling. As a reference, cold-booting a test app with heavy dependencies like React Material UI previously took 28 seconds on an M1-powered Macbook Pro and now takes ~1.5 seconds. Expect similar improvements if you are switching from a traditional bundler based setup.
37+
Since Vite is a native ESM dev server, it pre-bundles dependencies to reduce the number browser requests and handle CommonJS to ESM conversion. Previously Vite did this using Rollup, and in 2.0 it now uses `esbuild` which results in 10-100x faster dependency pre-bundling. As a reference, cold-booting a test app with heavy dependencies like React Material UI previously took 28 seconds on an M1-powered MacBook Pro and now takes ~1.5 seconds. Expect similar improvements if you are switching from a traditional bundler based setup.
3838

3939
### First-class CSS Support
4040

docs/config/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ export default defineConfig(({ command, mode }) => {
357357

358358
- **Type:** `ESBuildOptions | false`
359359

360-
`ESBuildOptions` extends [ESbuild's own transform options](https://esbuild.github.io/api/#transform-api). The most common use case is customizing JSX:
360+
`ESBuildOptions` extends [esbuild's own transform options](https://esbuild.github.io/api/#transform-api). The most common use case is customizing JSX:
361361

362362
```js
363363
export default defineConfig({
@@ -368,9 +368,9 @@ export default defineConfig(({ command, mode }) => {
368368
})
369369
```
370370

371-
By default, ESBuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either.
371+
By default, esbuild is applied to `ts`, `jsx` and `tsx` files. You can customize this with `esbuild.include` and `esbuild.exclude`, which can be a regex, a [picomatch](https://github.com/micromatch/picomatch#globbing-features) pattern, or an array of either.
372372

373-
In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by ESBuild:
373+
In addition, you can also use `esbuild.jsxInject` to automatically inject JSX helper imports for every file transformed by esbuild:
374374

375375
```js
376376
export default defineConfig({
@@ -380,7 +380,7 @@ export default defineConfig(({ command, mode }) => {
380380
})
381381
```
382382

383-
Set to `false` to disable ESbuild transforms.
383+
Set to `false` to disable esbuild transforms.
384384

385385
### assetsInclude
386386

@@ -849,7 +849,7 @@ export default defineConfig({
849849
- **Type:** `boolean | 'terser' | 'esbuild'`
850850
- **Default:** `'esbuild'`
851851

852-
Set to `false` to disable minification, or specify the minifier to use. The default is [Esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)
852+
Set to `false` to disable minification, or specify the minifier to use. The default is [esbuild](https://github.com/evanw/esbuild) which is 20 ~ 40x faster than terser and only 1 ~ 2% worse compression. [Benchmarks](https://github.com/privatenumber/minification-benchmarks)
853853

854854
Note the `build.minify` option is not available when using the `'es'` format in lib mode.
855855

docs/guide/api-javascript.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JavaScript API
22

3-
Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript or enable JS type checking in VSCode to leverage the intellisense and validation.
3+
Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript or enable JS type checking in VS Code to leverage the intellisense and validation.
44

55
## `createServer`
66

docs/guide/static-deploy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Vercel CLI
299299

300300
### Vercel for Git
301301

302-
1. Push your code to your git repository (GitHub, GitLab, BitBucket).
302+
1. Push your code to your git repository (GitHub, GitLab, Bitbucket).
303303
2. [Import your Vite project](https://vercel.com/new) into Vercel.
304304
3. Vercel will detect that you are using Vite and will enable the correct settings for your deployment.
305305
4. Your application is deployed! (e.g. [vite-vue-template.vercel.app](https://vite-vue-template.vercel.app/))

docs/guide/why.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Vite improves the dev server start time by first dividing the modules in an appl
1818

1919
- **Dependencies** are mostly plain JavaScript that do not change often during development. Some large dependencies (e.g. component libraries with hundreds of modules) are also quite expensive to process. Dependencies may also be shipped in various module formats (e.g. ESM or CommonJS).
2020

21-
Vite [pre-bundles dependencies](./dep-pre-bundling) using [esbuild](https://esbuild.github.io/). Esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.
21+
Vite [pre-bundles dependencies](./dep-pre-bundling) using [esbuild](https://esbuild.github.io/). esbuild is written in Go and pre-bundles dependencies 10-100x faster than JavaScript-based bundlers.
2222

2323
- **Source code** often contains non-plain JavaScript that needs transforming (e.g. JSX, CSS or Vue/Svelte components), and will be edited very often. Also, not all source code needs to be loaded at the same time (e.g. with route-based code-splitting).
2424

packages/create-vite/template-svelte-ts/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This template should help get you started developing with Svelte and TypeScript
44

55
## Recommended IDE Setup
66

7-
[VSCode](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
7+
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
88

99
## Need an official Svelte framework?
1010

packages/create-vite/template-svelte/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This template should help get you started developing with Svelte in Vite.
44

55
## Recommended IDE Setup
66

7-
[VSCode](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
7+
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
88

99
## Need an official Svelte framework?
1010

Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Vue 3 + Typescript + Vite
1+
# Vue 3 + TypeScript + Vite
22

3-
This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
44

55
## Recommended IDE Setup
66

7-
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
7+
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
88

99
## Type Support For `.vue` Imports in TS
1010

1111
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
1212

13-
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
13+
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14+
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
1515

1616
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).

packages/create-vite/template-vue-ts/src/components/HelloWorld.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const count = ref(0)
1111

1212
<p>
1313
Recommended IDE setup:
14-
<a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
14+
<a href="https://code.visualstudio.com/" target="_blank">VS Code</a>
1515
+
1616
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
1717
</p>

packages/create-vite/template-vue/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ This template should help get you started developing with Vue 3 in Vite. The tem
44

55
## Recommended IDE Setup
66

7-
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
7+
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

packages/create-vite/template-vue/src/components/HelloWorld.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const count = ref(0)
1313

1414
<p>
1515
Recommended IDE setup:
16-
<a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
16+
<a href="https://code.visualstudio.com/" target="_blank">VS Code</a>
1717
+
1818
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
1919
</p>

packages/playground/css/__tests__/css.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ test('PostCSS dir-dependency', async () => {
324324
}
325325
})
326326

327-
test('Url separation', async () => {
327+
test('URL separation', async () => {
328328
const urlSeparated = await page.$('.url-separated')
329329
const baseUrl = 'url(images/dog.webp)'
330330
const cases = new Array(5)

packages/playground/css/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h1>CSS</h1>
105105
</p>
106106

107107
<p class="url-separated">
108-
Url separation preservation: should have valid background-image
108+
URL separation preservation: should have valid background-image
109109
</p>
110110

111111
<p class="inlined">Inlined import - this should NOT be red.</p>

packages/playground/html/__tests__/html.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ if (!isBuild) {
231231
await editFile('invalid.html', (content) => {
232232
return content.replace('<div Bad', '<div> Good')
233233
})
234-
const content = await page.waitForSelector('text=Good Html')
234+
const content = await page.waitForSelector('text=Good HTML')
235235
expect(content).toBeTruthy()
236236
})
237237
})

packages/playground/html/invalid.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div Bad Html</div>
1+
<div Bad HTML</div>

packages/playground/worker/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ <h2 class="format-iife">format iife:</h2>
2727
</div>
2828

2929
<p>
30-
new Worker(new Url('./url-worker.js', import.meta.url), { type: 'module' })
30+
new Worker(new URL('./url-worker.js', import.meta.url), { type: 'module' })
3131
<span class="classname">.worker-import-meta-url</span>
3232
</p>
3333
<code class="worker-import-meta-url"></code>
3434

3535
<p>
36-
new SharedWorker(new Url('./url-shared-worker.js', import.meta.url), { type:
36+
new SharedWorker(new URL('./url-shared-worker.js', import.meta.url), { type:
3737
'module' })
3838
<span class="classname">.shared-worker-import-meta-url</span>
3939
</p>
@@ -46,13 +46,13 @@ <h2 class="format-iife">format iife:</h2>
4646
<code class="nested-worker"></code>
4747

4848
<p>
49-
new Worker(new Url('./classic-worker.js', import.meta.url))
49+
new Worker(new URL('./classic-worker.js', import.meta.url))
5050
<span class="classname">.classic-worker</span>
5151
</p>
5252
<code class="classic-worker"></code>
5353

5454
<p>
55-
new SharedWorker(new Url('./classic-shared-worker.js', import.meta.url), {
55+
new SharedWorker(new URL('./classic-shared-worker.js', import.meta.url), {
5656
type: 'classic' })
5757
<span class="classname">.classic-shared-worker</span>
5858
</p>

packages/plugin-react/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ react({
7575
})
7676
```
7777

78-
This option does not enable _code transformation_. That is handled by ESBuild.
78+
This option does not enable _code transformation_. That is handled by esbuild.
7979

8080
**Note:** TypeScript syntax is handled automatically.
8181

packages/vite/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ See [2.9.0-beta.0 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.0/p
325325
326326
### Default preview port
327327
328-
New default port for `vite preview` is 4173 (avoid conflicts in MacOS that took over the 5000 port)
328+
New default port for `vite preview` is 4173 (avoid conflicts in macOS that took over the 5000 port)
329329
330330
### Workers using standard syntax
331331

packages/vite/src/node/plugins/css.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
checkPublicFile
3737
} from './asset'
3838
import MagicString from 'magic-string'
39-
import type * as Postcss from 'postcss'
39+
import type * as PostCSS from 'postcss'
4040
import type Sass from 'sass'
4141
// We need to disable check of extraneous import which is buggy for stylus,
4242
// and causes the CI tests fail, see: https://github.com/vitejs/vite/pull/2860
@@ -59,8 +59,8 @@ export interface CSSOptions {
5959
preprocessorOptions?: Record<string, any>
6060
postcss?:
6161
| string
62-
| (Postcss.ProcessOptions & {
63-
plugins?: Postcss.Plugin[]
62+
| (PostCSS.ProcessOptions & {
63+
plugins?: PostCSS.Plugin[]
6464
})
6565
/**
6666
* Enables css sourcemaps during dev
@@ -617,7 +617,7 @@ async function compileCSS(
617617
): Promise<{
618618
code: string
619619
map?: SourceMapInput
620-
ast?: Postcss.Result
620+
ast?: PostCSS.Result
621621
modules?: Record<string, string>
622622
deps?: Set<string>
623623
}> {
@@ -735,7 +735,7 @@ async function compileCSS(
735735
postcssPlugins.push(
736736
UrlRewritePostcssPlugin({
737737
replacer: urlReplacer
738-
}) as Postcss.Plugin
738+
}) as PostCSS.Plugin
739739
)
740740

741741
if (isModule) {
@@ -911,8 +911,8 @@ function combineSourcemapsIfExists(
911911
}
912912

913913
interface PostCSSConfigResult {
914-
options: Postcss.ProcessOptions
915-
plugins: Postcss.Plugin[]
914+
options: PostCSS.ProcessOptions
915+
plugins: PostCSS.Plugin[]
916916
}
917917

918918
async function resolvePostcssConfig(
@@ -961,7 +961,7 @@ export const cssUrlRE =
961961
export const importCssRE = /@import ('[^']+\.css'|"[^"]+\.css"|[^'")]+\.css)/
962962
const cssImageSetRE = /image-set\(([^)]+)\)/
963963

964-
const UrlRewritePostcssPlugin: Postcss.PluginCreator<{
964+
const UrlRewritePostcssPlugin: PostCSS.PluginCreator<{
965965
replacer: CssUrlReplacer
966966
}> = (opts) => {
967967
if (!opts) {
@@ -1094,11 +1094,11 @@ async function hoistAtImports(css: string) {
10941094
return (await postcss.default([AtImportHoistPlugin]).process(css)).css
10951095
}
10961096

1097-
const AtImportHoistPlugin: Postcss.PluginCreator<any> = () => {
1097+
const AtImportHoistPlugin: PostCSS.PluginCreator<any> = () => {
10981098
return {
10991099
postcssPlugin: 'vite-hoist-at-imports',
11001100
Once(root) {
1101-
const imports: Postcss.AtRule[] = []
1101+
const imports: PostCSS.AtRule[] = []
11021102
root.walkAtRules((rule) => {
11031103
if (rule.name === 'import') {
11041104
// record in reverse so that can simply prepend to preserve order

0 commit comments

Comments
 (0)