Skip to content

update master #404

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 50 commits into from
Nov 12, 2017
Merged

update master #404

merged 50 commits into from
Nov 12, 2017

Conversation

dear-lizhihua
Copy link

No description provided.

dear-lizhihua and others added 30 commits September 3, 2017 20:42
# Conflicts:
#	src/content/plugins/module-concatenation-plugin.md
# Conflicts:
#	antwar.config.js
#	src/components/Footer/Footer.jsx
#	src/components/Navigation/Navigation.jsx
#	src/components/Site/Site.jsx
#	src/components/Splash/Splash.jsx
#	src/content/analyze.md
#	src/content/api/cli.md
#	src/content/api/compilation.md
#	src/content/api/compiler.md
#	src/content/api/index.md
#	src/content/api/loaders.md
#	src/content/api/module-factories.md
#	src/content/api/plugins.md
#	src/content/api/plugins/dependency.md
#	src/content/api/plugins/tapable.md
#	src/content/api/plugins/template.md
#	src/content/api/stats.md
#	src/content/comparison.md
#	src/content/configuration/dev-server.md
#	src/content/configuration/module.md
#	src/content/configuration/stats.md
#	src/content/contribute/plugin-patterns.md
#	src/content/contribute/release-process.md
#	src/content/contribute/writing-a-loader.md
#	src/content/contribute/writing-a-plugin.md
#	src/content/development/index.md
#	src/content/glossary.md
#	src/content/guides/code-splitting.md
#	src/content/guides/development.md
#	src/content/guides/getting-started.md
#	src/content/guides/production.md
#	src/content/license.md
#	src/content/support/index.md
#	template.ejs
# Conflicts:
#	src/content/loaders/babel-loader.md
#	src/content/loaders/bundle-loader.md
#	src/content/loaders/cache-loader.md
#	src/content/loaders/coffee-loader.md
#	src/content/loaders/css-loader.md
#	src/content/loaders/file-loader.md
#	src/content/loaders/imports-loader.md
#	src/content/loaders/istanbul-instrumenter-loader.md
#	src/content/loaders/json5-loader.md
#	src/content/loaders/mocha-loader.md
#	src/content/loaders/node-loader.md
#	src/content/loaders/raw-loader.md
#	src/content/loaders/react-proxy-loader.md
#	src/content/loaders/sass-loader.md
#	src/content/loaders/script-loader.md
#	src/content/loaders/source-map-loader.md
#	src/content/loaders/style-loader.md
#	src/content/loaders/val-loader.md
#	src/content/loaders/worker-loader.md
#	src/content/loaders/yaml-frontmatter-loader.md
#	src/content/plugins/babel-minify-webpack-plugin.md
#	src/content/plugins/component-webpack-plugin.md
#	src/content/plugins/compression-webpack-plugin.md
#	src/content/plugins/extract-text-webpack-plugin.md
# Conflicts:
#	src/components/Navigation/Links.json
# Conflicts:
#	src/components/Site/Site.jsx
#	src/content/api/compilation.md
#	src/content/api/compiler.md
#	src/content/api/loaders.md
#	src/content/api/module-factories.md
#	src/content/api/plugins.md
#	src/content/configuration/output.md
#	src/content/contribute/plugin-patterns.md
#	src/content/contribute/release-process.md
#	src/content/contribute/writing-a-loader.md
#	src/content/plugins/module-concatenation-plugin.md
Make the `index` page more beginner friendly with less technical
lingo and complex details.

Resolves #1416
…gin (#1684)

This adds a link between “concatenation behavior” and “scope hoisting”. Without this, 
a new person might be confused what exactly “scope hoisting” is (because it appears 
without any visible connection to the previous content).
aparajita and others added 13 commits November 3, 2017 00:18
In actual fact the parameters passed to `emitWarning` / `emitError` must 
be an instance of Error.
Document the new `--concatenate-modules` flag in both the CLI documentation
and production guide. Add section on the `ModuleConcatenationPlugin` in the 
production guide (as we include this plugin under `-p`, it also makes sense to 
mention it in this guide.
Rename plugin identifier and require webpack when it is used in the
configuration examples.
# Conflicts:
#	src/content/guides/development.md
@dear-lizhihua
Copy link
Author

@biqing
src/content/concepts/index.md
概念页面有修改,需要审校下

# Conflicts:
#	src/content/api/cli.md
#	src/content/guides/production.md
# Conflicts:
#	src/content/loaders/babel-loader.md
#	src/content/loaders/coffee-loader.md
#	src/content/loaders/i18n-loader.md
#	src/content/loaders/json-loader.md
#	src/content/loaders/raw-loader.md
#	src/content/loaders/script-loader.md
#	src/content/loaders/style-loader.md
#	src/content/loaders/url-loader.md
#	src/content/loaders/worker-loader.md
#	src/content/plugins/babel-minify-webpack-plugin.md
#	src/content/plugins/uglifyjs-webpack-plugin.md
Copy link

@biqing biqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完成 /concepts/index.md review

---

*webpack* 是一个现代 JavaScript 应用程序的_模块打包器(module bundler)_。当 webpack 处理应用程序时,它会递归地构建一个_依赖关系图(dependency graph)_,其中包含应用程序需要的每个模块,然后将所有这些模块打包成少量的 _bundle_ - 通常只有一个,由浏览器加载
从其提供的核心功能来看,*webpack* 是一个现代 JavaScript 应用程序的_模块打包器(module bundler)_。当 webpack 处理应用程序时,它会递归地构建一个_依赖关系图(dependency graph)_,其中包含应用程序需要的每个模块,然后将所有这些模块打包成一个或多个 _bundle_。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

从其提供的核心功能来看有点过于解读,用本质上就好


在 webpack 中,我们使用 [webpack 配置对象(webpack configuration object)](/configuration) 中的 `entry` 属性来定义_入口_
然后,处理每个依赖,并将其输出到名为 *bundles* 的文件中,我们将在下一章节详细讨论这个过程
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

然后,处理每个依赖,并将其输出到名为 bundles 的文件中

这里的错误比较明显,应译为

每个依赖项随即被处理,最后输出到称之为“包(bundles)”的文件中

`output` 属性还有[更多可配置的特性](/configuration/output),但让我们花一些时间先了解一些 `output` 属性最常见的用例。

[了解更多!](/concepts/output)
`output` 属性还有[更多可配置的特性](/configuration/output),如果你想要了解更多关于 `output` 属性的概念,你可以通过[阅读核心章节]more in the concepts section](/concepts/output)来了解更多。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对比英文版,这里应该有个T> 的开头,不过只是版式问题


然而由于 loader 仅在每个文件的基础上执行转换,而 `插件(plugins)` 更常用于(但不限于)在打包模块的 “compilation” 和 “chunk” 生命周期执行操作和自定义功能[(查看更多)](/concepts/plugins)。webpack 的插件系统[极其强大和可定制化](/api/plugins)。
loader 习惯用于转换某些类型的模块,而插件则可以用于执行范围更广的任务。插件的范围包括,从打包优化和压缩,一直到重新定义环境中的变量。[插件接口](/api/plugins)功能极其强大,可以用来处理各种各样的任务
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

习惯用于

改为

被用于

@dear-lizhihua dear-lizhihua merged commit 213a467 into docschina:cn Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants