Skip to content
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

Merge branch 'master' into cn #350

Merged
merged 9 commits into from
Aug 10, 2017
Merged

Merge branch 'master' into cn #350

merged 9 commits into from
Aug 10, 2017

Conversation

dear-lizhihua
Copy link

@dear-lizhihua dear-lizhihua commented Aug 6, 2017

Conflicts:

content/configuration/externals.md
content/configuration/module.md
content/configuration/node.md
content/configuration/output.md
content/development/plugin-patterns.md

dxu and others added 9 commits August 5, 2017 11:15
The currently deployed documentation indicates that there are 
4 module contexts you can specify under the externals config...

- `global`
- `commonjs`
- `commonjs2`
- `amd`

... which contradicts both the examples that surround it, and the 
actual library functionality. 

This just changes the word "global" to "root" in the section that lists 
the module contexts.
Fix list formatting in `/development/plugin-patterns/`. Remove the
`inline-block` declaration to let inline code flow more naturally
and prevent this odd wrapping if other badly formatted lists slip in.
The documentation about using built-in Node.js modules was very poor
(i.e. non-existent). This expands the documentation of the "node"
configuration option, and shows how one can require built-in modules if
desired.

Furthermore, all possible effects of the options are explicitly
documented. Instead of being vague of what happens when `false` is used,
it is explicitly spelled out what happens.

References:

-
https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/WebpackOptionsApply.js
  shows when the NodeStuffPlugin and NodeSourcePlugin plugins are used.
- https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/NodeStuffPlugin.js
  is the plugin that is used for every target.
- https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/node/NodeSourcePlugin.js
  is the plugin that is only used for "web" and "webworker" targets.
- https://github.com/webpack/webpack/blob/a589a6c9789a9d342fc630e36ab81827dd20289b/lib/MultiModule.js#L65-L67
  is the generated "webpackMissingModule" code for unresolved modules.
  (when the NodeSourcePlugin is not used, the environment's "require" is
  used. In Node.js, this also throws a "Cannot find module 'modulename'"
  error (with single quotes instead of double quotes)).
Correct `output.filename` substitutions and move the others to
`output.sourceMapFilename`. Also fix `related` link in the context-
replacement-plugin.

Fixes #1467
# Conflicts:
#	content/configuration/externals.md
#	content/configuration/module.md
#	content/configuration/node.md
#	content/configuration/output.md
#	content/development/plugin-patterns.md
@dear-lizhihua
Copy link
Author

@biqing

@dear-lizhihua
Copy link
Author

dear-lizhihua commented Aug 6, 2017

终于想明白怎么看我提交的修改了,倒数第二个提交是我合并的记录,倒数第一个提交是我提 pr 的记录。

以后大家直接通过这里 34bc9e3files changed 之间的对比来审核:
image

@dear-lizhihua
Copy link
Author

或者通过倒数第二次提交(是我合并的记录)和倒数第一次提交(是我修改的记录)之间进行对比来审核

@aladdin-add
Copy link
Member

aladdin-add commented Aug 6, 2017

我觉得比较推荐的方式是:merge 上游分支使用 --rebase; 合并 翻译 & 校对 使用 --squashe.
这样的commits纪录也比较清晰。

@dear-lizhihua
Copy link
Author

@aladdin-add
OK,我先学习下这两种方式,看看 WebStorm 有没有提供图形界面的操作方式。

@dear-lizhihua dear-lizhihua merged commit 56dfc99 into docschina:cn Aug 10, 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.

7 participants