Skip to content

Update ja docs #1006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/ja/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [CSS モジュール](features/css-modules.md)
- [PostCSS](features/postcss.md)
- [ホットリロード](features/hot-reload.md)
- [関数型コンポーネント](features/functional.md)
- 構成
- [プリプロセッサの使用](configurations/pre-processors.md)
- [アセット URL ハンドリング](configurations/asset-url.md)
Expand All @@ -23,6 +24,7 @@
- [preLoaders](options.md#preloaders)
- [postLoaders](options.md#postloaders)
- [postcss](options.md#postcss)
- [postcss.config](options.md#postcssconfig)
- [cssSourceMap](options.md#csssourcemap)
- [esModule](options.md#esmodule)
- [preserveWhitespace](options.md#preservewhitespace)
Expand All @@ -32,3 +34,4 @@
- [buble](options.md#buble)
- [extractCSS](options.md#extractcss)
- [optimizeSSR](options.md#optimizessr)
- [cacheBusting](options.md#cachebusting)
15 changes: 15 additions & 0 deletions docs/ja/features/functional.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 関数型コンポーネント向けのテンプレート

> 13.1.0 で新規, Vue >= 2.5.0 必須

`vue-loader >= 13.3.0` によって、`*.vue` 内で単一ファイルコンポーネントとして定義された関数型コンポーネントは適切なテンプレートコンパイルを楽しむことができ、スコープ付き CSS そしてホットリロードをサポートします。

関数型コンポーネントとしてコンパイルする必要があるテンプレートを示すには、テンプレートブロックに `functional` 属性を追加します。これにより、`<script>` ブロックの `functional` オプションを省略することもできます。

テンプレート内の式は、[関数型の描画コンテキスト](https://jp.vuejs.org/v2/guide/render-function.html#関数型コンポーネント)で評価されます。これは、プロパティはテンプレートで `props.xxx` としてアクセスする必要があるということを意味します:

``` html
<template functional>
<div>{{ props.foo }}</div>
</template>
```
34 changes: 34 additions & 0 deletions docs/ja/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,31 @@ module.exports = {
}
```

### postcss.config

> 13.2.1 で新規追加

- 型: `Object`
- デフォルト: `undefined`

このフィールドは、[postcss-loader](https://github.com/postcss/postcss-loader#config-1) と同じ方法で PostCSS の設定をカスタマイズできます。

- **postcss.config.path**

PostCSS 設定ファイルを読み込むパス(ファイルまたはディレクトリ)を指定します。

``` js
postcss: {
config: {
path: path.resolve('./src')
}
}
```

- **postcss.config.ctx**

PostCSS プラグインにコンテキストを提供します。より詳細については、[postcss-loader のドキュメント](https://github.com/postcss/postcss-loader#context-ctx) を参照してください。

### cssSourceMap

- 型: `boolean`
Expand All @@ -120,6 +145,15 @@ module.exports = {

注意: もしメインの Webpack の設定に `devtool` オプションが存在しないければオートで `false` にセットされます。

### cacheBusting

> 13.2.0 で新規追加

- 型: `boolean`
- デフォルト: 開発モードで `true`、プロダクションモードで `false`

ファイル名にハッシュクエリを追加することによってキャッシュを破損を伴うソースマップを生成するかどうか。これをオフにするとソースマップデバッギングにも役に立ちます。

### esModule

- 型: `boolean`
Expand Down