Skip to content

Commit edb23b2

Browse files
authored
Translate Installation into ja (#52)
1 parent 032c9d5 commit edb23b2

File tree

1 file changed

+60
-58
lines changed

1 file changed

+60
-58
lines changed

src/guide/installation.md

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
1-
# Installation
1+
# インストール
22

3-
## Release Notes
3+
## リリースノート
44

5-
Latest beta version: 3.0.0-rc.5
5+
最新のベータバージョン: 3.0.0-rc.5
66

7-
Detailed release notes for each version are available on [GitHub](https://github.com/vuejs/vue-next/releases).
7+
各バージョンの詳細なリリースノートは、 [GitHub](https://github.com/vuejs/vue-next/releases) で入手できます。
88

99
## Vue Devtools
1010

11-
> Currently in Beta
11+
> 現在、ベータ版です。
1212
13-
> Vue Devtools for Vue 3 requires at least `vue@^3.0.0-rc.1`
13+
> Vue 3 向けの Vue Devtools の利用には、`vue@^3.0.0-rc.1` 以上が必要です。
1414
15-
When using Vue, we recommend also installing the [Vue Devtools](https://github.com/vuejs/vue-devtools#vue-devtools) in your browser, allowing you to inspect and debug your Vue applications in a more user-friendly interface.
15+
Vue を使用する場合は、ブラウザに [Vue Devtools](https://github.com/vuejs/vue-devtools#vue-devtools) をインストールすることをお勧めします。これにより、Vue アプリケーションをよりユーザーフレンドリーなインターフェースで調査、デバッグすることが可能になります。
1616

17-
[Get the Chrome Extension](https://chrome.google.com/webstore/detail/vuejs-devtools/ljjemllljcmogpfapbkkighbhhppjdbg)
17+
[Chrome 拡張版を入手](https://chrome.google.com/webstore/detail/vuejs-devtools/ljjemllljcmogpfapbkkighbhhppjdbg)
1818

19-
[Get the Firefox Addon](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
19+
[Firefox アドオン版を入手](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
2020

21-
[Get the standalone Electron app](https://github.com/vuejs/vue-devtools/blob/dev/packages/shell-electron/README.md)
21+
[スタンドアロンの Electron アプリケーション版を入手](https://github.com/vuejs/vue-devtools/blob/dev/packages/shell-electron/README.md)
2222

2323
## CDN
2424

25-
For prototyping or learning purposes, you can use the latest version with:
25+
プロトタイピングや学習を目的とする場合は、以下のようにして最新バージョンを利用できます:
2626

2727
```html
2828
<script src="https://unpkg.com/vue@next"></script>
2929
```
3030

31-
For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions.
31+
本番環境では、新しいバージョンによる意図しない不具合を避けるため、特定のバージョン番号とビルド番号にリンクすることをお勧めします。
3232

3333
## NPM
3434

35-
NPM is the recommended installation method when building large scale applications with Vue. It pairs nicely with module bundlers such as [Webpack](https://webpack.js.org/) or [Browserify](http://browserify.org/). Vue also provides accompanying tools for authoring [Single File Components](../guide/single-file-component.html).
35+
Vue による大規模アプリケーションを構築するときには、NPM を利用したインストールを推奨します。[Webpack](https://webpack.js.org/) または [Browserify](http://browserify.org/) のようなモジュールバンドラーとうまく組み合わせることができます。Vue [単一ファイルコンポーネント](../guide/single-file-component.html)を作成するための、付随するツールも提供しています。
3636

3737
```bash
38-
# latest stable
38+
# 最新安定版
3939
$ npm install vue@next
4040
```
4141

4242
## CLI
4343

44-
Vue provides an [official CLI](https://github.com/vuejs/vue-cli) for quickly scaffolding ambitious Single Page Applications. It provides batteries-included build setups for a modern frontend workflow. It takes only a few minutes to get up and running with hot-reload, lint-on-save, and production-ready builds. See [the Vue CLI docs](https://cli.vuejs.org) for more details.
44+
大規模なシングルページアプリケーション開発の足場を素早く組むために、Vue [公式 CLI](https://github.com/vuejs/vue-cli) を提供します。この CLI にはモダンなフロントエンドワークフローのための、すぐに使えるビルド設定を用意しています。ホットリロード、保存時のリント、本番リリースのビルドができるようになるまでには、ほんの数分しかかかりません。より詳細は [Vue CLI ドキュメント](https://cli.vuejs.org) を参照してください。
4545

4646
::: tip
47-
The CLI assumes prior knowledge of Node.js and the associated build tools. If you are new to Vue or front-end build tools, we strongly suggest going through <a href="./">the guide</a> without any build tools before using the CLI.
47+
CLI Node.js と関連するビルドツールに関する予備知識を前提としています。もし、Vue またはフロントエンドビルドツールを初めて使用する場合は、CLI を使用する前に、ビルドツールなしで<a href="./">ガイド</a>を参照することを強くお勧めします。
4848
:::
4949

50-
For Vue 3, you should use Vue CLI v4.5 available on `npm` as `@vue/cli@next`. To upgrade, you need to reinstall the latest version of `@vue/cli` globally:
50+
`npm` 上で `@vue/cli@next` として、Vue 3 向けの Vue CLI v4.5 が利用可能です。以前のバージョンからアップグレードする場合は、以下のように `@vue/cli` をグローバルに再インストールしてください:
5151

5252
```bash
5353
yarn global add @vue/cli@next
54-
# OR
54+
# または
5555
npm install -g @vue/cli@next
5656
```
5757

58-
Then in the Vue projects, run
58+
その後、Vue プロジェクト内で以下を実行します
5959

6060
```bash
6161
vue upgrade --next
6262
```
6363

6464
## Vite
6565

66-
[Vite](https://github.com/vitejs/vite) is a web development build tool that allows for lighting fast serving of code due its native ES Module import approach.
66+
[Vite](https://github.com/vitejs/vite) は ネイティブ ES Module import の仕組みを利用して、超高速なコード配信を可能としたウェブ開発ビルドツールです。
6767

68-
Vue projects can quickly be set up with Vite by running the following commands in your terminal.
68+
次のコマンドをターミナルで実行すると Vite ですぐに Vue プロジェクトをセットアップできます。
6969

70-
With NPM:
70+
NPM の場合:
7171

7272
```bash
73-
$ npm init vite-app <project-name>
74-
$ cd <project-name>
73+
$ npm init vite-app <プロジェクト名>
74+
$ cd <プロジェクト名>
7575
$ npm install
7676
$ npm run dev
7777
```
7878

79-
Or with Yarn:
79+
または Yarn の場合:
8080

8181
```bash
8282
$ yarn create vite-app <project-name>
@@ -85,68 +85,70 @@ $ yarn
8585
$ yarn dev
8686
```
8787

88-
## Explanation of Different Builds
88+
## さまざまなビルドについて
8989

90-
In the [`dist/` directory of the NPM package](https://cdn.jsdelivr.net/npm/[email protected]/dist/) you will find many different builds of Vue.js. Here is an overview of which `dist` file should be used depending on the use-case.
90+
[NPM パッケージの `dist/` ディレクトリ](https://cdn.jsdelivr.net/npm/[email protected]/dist/) には、Vue.js の多くのさまざまなビルドが見つかります。利用用途ごとに `dist` ファイルの使い分けの概要を説明します。
9191

92-
### From CDN or without a Bundler
92+
### CDN を利用、またはバンドラーを使用しない場合
9393

9494
#### `vue(.runtime).global(.prod).js`:
9595

96-
- For direct use via `<script src="...">` in the browser, exposes the Vue global.
97-
- In-browser template compilation:
98-
- `vue.global.js` is the "full" build that includes both the compiler and the runtime so it supports compiling templates on the fly.
99-
- `vue.runtime.global.js` contains only the runtime and requires templates to be pre-compiled during a build step.
100-
- Inlines all Vue core internal packages - i.e. it's a single file with no dependencies on 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.
101-
- Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `*.prod.js` files for production.
96+
- ブラウザで直接 `<script src="...">` と読み込むためのビルドです。 Vue がグローバルに公開されます。
97+
- ブラウザによるテンプレートのコンパイルについて:
98+
99+
- `vue.global.js` は、コンパイラとランタイムの両方が含まれた "完全な" ビルドです。そのまますぐにテンプレートをコンパイルすることができます。
100+
- `vue.runtime.global.js` はランタイムのみ含まれています。そのため、ビルド時にテンプレートの事前コンパイルが必要です。
101+
102+
- すべての Vue コアの内部パッケージが含まれます - すなわち、他のファイルに依存しない単一のファイルです。つまりコードの同じインスタンスを参照するためには、すべてをこのファイルからインポートしなくてはいけません。
103+
- 本番/開発向けコードがどちらもハードコードされています。本番ビルドは事前に縮小化(minify)されたファイルです。本番環境では `*.prod.js` ファイルを使用してください。
102104

103105
:::tip Note
104-
Global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and are only meant for direct use via `<script src="...">`.
106+
グローバルビルドは [UMD](https://github.com/umdjs/umd) ビルドではありません。`<script src="...">` で直接使用するため、 [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) にビルドされています。
105107
:::
106108

107-
#### vue(.runtime).esm-browser(.prod).js:
109+
#### `vue(.runtime).esm-browser(.prod).js`:
108110

109-
- For usage via native ES modules imports (in browser via `<script type="module">`.
110-
- Shares the same runtime compilation, dependency inlining and hard-coded prod/dev behavior with the global build.
111+
- `<script type="module">` のようにして、ブラウザで利用するネイティブ ES modules インポート向けビルドです。
112+
- ランタイムのコンパイルと、依存パッケージのインライン化、ハードコードされた本番/開発向けコードの動作は、グローバルビルドと同様です。
111113

112-
### With a Bundler
114+
### バンドラーを使う場合
113115

114-
#### vue(.runtime).esm-bundler.js:
116+
#### `vue(.runtime).esm-bundler.js`:
115117

116-
- For use with bundlers like `webpack`, `rollup` and `parcel`.
117-
- Leaves prod/dev branches with `process.env.NODE_ENV guards` (must be replaced by bundler)
118-
- Does not ship minified builds (to be done together with the rest of the code after bundling)
119-
- Imports dependencies (e.g. `@vue/runtime-core`, `@vue/runtime-compiler`)
120-
- Imported dependencies are also esm-bundler builds and will in turn import their dependencies (e.g. @vue/runtime-core imports @vue/reactivity)
121-
- This means you **can** install/import these deps individually without ending up with different instances of these dependencies, but you must make sure they all resolve to the same version.
122-
- In-browser template compilation:
123-
- `vue.runtime.esm-bundler.js` **(default)** is runtime only, and requires all templates to be pre-compiled. This is the default entry for bundlers (via module field in `package.json`) because when using a bundler templates are typically pre-compiled (e.g. in `*.vue` files).
124-
- `vue.esm-bundler.js`: includes the runtime compiler. Use this if you are using a bundler but still want runtime template compilation (e.g. in-DOM templates or templates via inline JavaScript strings). You will need to configure your bundler to alias vue to this file.
118+
- `webpack``rollup``parcel` のようなバンドラー向けのビルドです。
119+
- 本番/開発向けコードは `process.env.NODE_ENV ガード` で処理されます (バンドラーによって置換されます)
120+
- 縮小化(minified)ビルドではありません (縮小化は、他コードと共にバンドル処理後に行われます)
121+
- 依存パッケージのインポートについて (例えば、 `@vue/runtime-core` `@vue/runtime-compiler`)
122+
- インポートされる依存パッケージは同様に ESM バンドラービルドになっていて、続いて自身の依存パッケージをインポートします(例えば、 `@vue/runtime-core``@vue/reactivity` をインポートします)
123+
- これはつまり、依存パッケージ間で異なるインスタンスを参照することなく、一つ一つの依存パッケージをインストールし、インポートすることが可能ということです。ただし、全てのパッケージが同じバージョンに解決されるようにしなくてはいけません。
124+
- ブラウザによるテンプレートのコンパイルについて:
125+
- `vue.runtime.esm-bundler.js` **(デフォルト)** はランタイムのみで、すべてのテンプレートの事前コンパイルが必要です。一般に、バンドラー使用時にはテンプレートは事前コンパイルされるため(例えば、`*.vue` ファイル内のテンプレート)、 このファイルはバンドラーにとってデフォルトのエントリになります(`package.json` の module フィールド経由)
126+
- `vue.esm-bundler.js`: ランタイムのコンパイラを含みます。もし、バンドラーを使用しながらも、ランタイムによるテンプレートのコンパイルが必要な場合(例えば、DOM 内テンプレート、またはインライン化された JavaScript 文字列としてのテンプレート)に使用します。vue をこのファイルにエイリアスするよう、バンドラーを設定する必要があります。
125127

126-
### For Server-Side Rendering
128+
### サーバーサイドレンダリング
127129

128130
#### `vue.cjs(.prod).js`:
129131

130-
- For use in Node.js server-side rendering via `require()`.
131-
- If you bundle your app with webpack with `target: 'node'` and properly externalize `vue`, this is the build that will be loaded.
132-
- The dev/prod files are pre-built, but the appropriate file is automatically required based on `process.env.NODE_ENV`.
132+
- `require()` を使って、Node.js でサーバサイドレンダリングするためのビルドです。
133+
- もし `target: 'node'` 設定で webpack を使ってアプリケーションをバンドルして、`vue` を適切に外部化しているなら、このビルドが読み込まれるでしょう。
134+
- 開発/本番向けのファイルは事前ビルドされていますが、`process.env.NODE_ENV` に基づいて適切なファイルが require されます。
133135

134-
## Runtime + Compiler vs. Runtime-only
136+
## ランタイム + コンパイラとランタイム限定の違い
135137

136-
If you need to compile templates on the client (e.g. passing a string to the template option, or mounting to an element using its in-DOM HTML as the template), you will need the compiler and thus the full build:
138+
もし、クライアントでテンプレートをコンパイルする必要がある(例えば、template オプションに文字列を渡す、または DOM 内の HTML をテンプレートとして要素にマウントする)場合は、コンパイラ、すなわち完全ビルドが必要です:
137139

138140
```js
139-
// this requires the compiler
141+
// これはコンパイラが必要です
140142
Vue.createApp({
141143
template: '<div>{{ hi }}</div>'
142144
})
143145

144-
// this does not
146+
// これはコンパイラ不要です
145147
Vue.createApp({
146148
render() {
147149
return Vue.h('div', {}, this.hi)
148150
}
149151
})
150152
```
151153

152-
When using `vue-loader`, templates inside `*.vue` files are pre-compiled into JavaScript at build time. You don’t really need the compiler in the final bundle, and can therefore use the runtime-only build.
154+
`vue-loader`を利用する場合、`*.vue` ファイル内部のテンプレートはビルド時に JavaScript に事前コンパイルされます。最終成果物の中にコンパイラが明らかに不要なるため、ランタイム限定ビルドを利用することができます。

0 commit comments

Comments
 (0)