From 2ef363598c092b9a22858e2ffd80ce406891d76a Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Sun, 4 Feb 2018 00:59:34 +0800 Subject: [PATCH 1/2] [docs][zh-cn] synced recent updates from #436ac94 to #46558ce --- docs/zh-cn/SUMMARY.md | 3 +- docs/zh-cn/configurations/advanced.md | 25 ------ docs/zh-cn/configurations/custom-blocks.md | 1 - docs/zh-cn/configurations/extract-css.md | 36 -------- docs/zh-cn/features/css-modules.md | 11 --- docs/zh-cn/features/postcss.md | 15 +--- docs/zh-cn/options.md | 59 ++++++------- docs/zh-cn/start/setup.md | 11 ++- docs/zh-cn/workflow/linting.md | 66 +++------------ docs/zh-cn/workflow/production.md | 11 +-- docs/zh-cn/workflow/testing-with-mocks.md | 70 --------------- docs/zh-cn/workflow/testing.md | 99 +--------------------- 12 files changed, 45 insertions(+), 362 deletions(-) delete mode 100644 docs/zh-cn/workflow/testing-with-mocks.md diff --git a/docs/zh-cn/SUMMARY.md b/docs/zh-cn/SUMMARY.md index d8e58fde5..e1e35f348 100644 --- a/docs/zh-cn/SUMMARY.md +++ b/docs/zh-cn/SUMMARY.md @@ -18,7 +18,6 @@ - [生产环境构建](workflow/production.md) - [代码检验](workflow/linting.md) - [测试](workflow/testing.md) - - [使用 Mock 测试](workflow/testing-with-mocks.md) - [选项参考](options.md) - [loaders](options.md#loaders) - [preLoaders](options.md#preloaders) @@ -33,4 +32,4 @@ - [transformToRequire](options.md#transformtorequire) - [buble](options.md#buble) - [extractCSS](options.md#extractcss) - - [optimizeSSR](options.md#optimizessr) \ No newline at end of file + - [optimizeSSR](options.md#optimizessr) diff --git a/docs/zh-cn/configurations/advanced.md b/docs/zh-cn/configurations/advanced.md index 04e5c1ab0..592836e6c 100644 --- a/docs/zh-cn/configurations/advanced.md +++ b/docs/zh-cn/configurations/advanced.md @@ -12,8 +12,6 @@ > 注意 `preLoaders` 和 `postLoaders` 只在 10.3.0+ 版本支持 -### webpack 2.x - ``` js module.exports = { // other options... @@ -54,27 +52,4 @@ module.exports = { } ``` -### webpack 1.x - -``` js -// webpack.config.js -module.exports = { - // other options... - module: { - loaders: [ - { - test: /\.vue$/, - loader: 'vue' - } - ] - }, - // `vue-loader` configurations - vue: { - loaders: { - // same configuration rules as above - } - } -} -``` - 进阶配置更实际的用法是[提取组件中的 CSS 到单个文件](./extract-css.md)。 diff --git a/docs/zh-cn/configurations/custom-blocks.md b/docs/zh-cn/configurations/custom-blocks.md index 2273f3367..5b1cbecbe 100644 --- a/docs/zh-cn/configurations/custom-blocks.md +++ b/docs/zh-cn/configurations/custom-blocks.md @@ -42,7 +42,6 @@ comp-a h2 { #### webpack.config.js ``` js -// webpack 2.x var ExtractTextPlugin = require("extract-text-webpack-plugin") module.exports = { diff --git a/docs/zh-cn/configurations/extract-css.md b/docs/zh-cn/configurations/extract-css.md index b0d0aa38d..b0f176771 100644 --- a/docs/zh-cn/configurations/extract-css.md +++ b/docs/zh-cn/configurations/extract-css.md @@ -39,9 +39,6 @@ module.exports = { 将所有 Vue 组件中的所有已处理的 CSS 提取为单个 CSS 文件配置示例: -### webpack 2.x - - ``` js // webpack.config.js var ExtractTextPlugin = require("extract-text-webpack-plugin") @@ -69,36 +66,3 @@ module.exports = { ] } ``` - -### webpack 1.x - -``` bash -npm install extract-text-webpack-plugin --save-dev -``` - -``` js -// webpack.config.js -var ExtractTextPlugin = require("extract-text-webpack-plugin") - -module.exports = { - // other options... - module: { - loaders: [ - { - test: /\.vue$/, - loader: 'vue' - }, - ] - }, - vue: { - loaders: { - css: ExtractTextPlugin.extract("css"), - // 你还可以引入