Skip to content

Commit 75253e7

Browse files
committed
Merge branch 'master' of https://github.com/webpack/webpack into jest
# Conflicts: # .eslintrc.js # package.json # test/BenchmarkTestCases.benchmark.js # test/ConfigTestCases.test.js # test/NodeWatchFileSystem.unittest.js # test/TestCases.test.js # test/WatcherEvents.test.js # test/cases/parsing/extract-require/index.js # test/configCases/parsing/harmony-this/index.js # test/statsCases/async-commons-chunk/expected.txt # yarn.lock
2 parents aff29fe + 55fb1da commit 75253e7

286 files changed

Lines changed: 4409 additions & 2761 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ trim_trailing_whitespace = true
88
insert_final_newline = true
99
max_line_length = 233
1010

11-
[*.json]
12-
indent_style = space
13-
indent_size = 2
14-
1511
[.prettierrc]
1612
indent_style = space
1713
indent_size = 2
1814

19-
[*.yml]
20-
indent_style = space
21-
indent_size = 2
22-
23-
[*.yaml]
15+
[*.{yml,yaml,json}]
2416
indent_style = space
2517
indent_size = 2
2618

.eslintrc.js

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
module.exports = {
2-
"root": true,
3-
"plugins": [
4-
"prettier",
5-
"node",
6-
"jest"
7-
],
8-
"extends": ["eslint:recommended", "plugin:node/recommended"],
9-
"env": {
10-
"node": true,
11-
"es6": true,
2+
root: true,
3+
plugins: ["prettier", "node", "jest"],
4+
extends: ["eslint:recommended", "plugin:node/recommended", "plugin:prettier/recommended"],
5+
env: {
6+
node: true,
7+
es6: true,
128
"jest/globals": true
139
},
14-
"parserOptions": { "ecmaVersion": 2017 },
15-
"rules": {
10+
parserOptions: {
11+
ecmaVersion: 2017
12+
},
13+
rules: {
1614
"prettier/prettier": "error",
1715
"no-undef": "error",
1816
"no-extra-semi": "error",
1917
"no-template-curly-in-string": "error",
2018
"no-caller": "error",
19+
"no-control-regex": "off",
2120
"yoda": "error",
2221
"eqeqeq": "error",
2322
"global-require": "off",
@@ -26,7 +25,7 @@ module.exports = {
2625
"no-extra-bind": "warn",
2726
"no-process-exit": "warn",
2827
"no-use-before-define": "off",
29-
"no-unused-vars": ["error", { "args": "none" }],
28+
"no-unused-vars": ["error", { args: "none" }],
3029
"no-unsafe-negation": "error",
3130
"no-loop-func": "warn",
3231
"indent": "off",
@@ -35,16 +34,30 @@ module.exports = {
3534
"node/no-unsupported-features": "error",
3635
"node/no-deprecated-api": "error",
3736
"node/no-missing-import": "error",
38-
"node/no-missing-require": [
39-
"error",
40-
{
41-
"allowModules": [
42-
"webpack"
43-
]
44-
}
45-
],
37+
"node/no-missing-require": ["error", { allowModules: ["webpack"] }],
4638
"node/no-unpublished-bin": "error",
4739
"node/no-unpublished-require": "error",
4840
"node/process-exit-as-throw": "error"
41+
},
42+
overrides: [
43+
{
44+
files: ["lib/**/*.runtime.js", "buildin/*.js", "hot/*.js"],
45+
env: {
46+
es6: false,
47+
browser: true
48+
},
49+
globals: {
50+
Promise: false,
51+
},
52+
parserOptions: {
53+
ecmaVersion: 5
54+
}
55+
},
56+
{
57+
files: ["test/**/*.js"],
58+
env: {
59+
mocha: true,
60+
}
4961
}
62+
]
5063
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
*.log
1111
.idea
1212
.vscode
13+
package-lock.json

.istanbul.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
instrumentation:
22
excludes:
33
- "**/*.runtime.js"
4+
- ".github/*"

.jsbeautifyrc

Lines changed: 0 additions & 25 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
printWidth: 80,
3+
useTabs: true,
4+
tabWidth: 2
5+
};

CONTRIBUTING.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,7 @@ documentation pages:
2525

2626
## Setup
2727

28-
```bash
29-
git clone https://github.com/webpack/webpack.git
30-
cd webpack
31-
npm install -g yarn
32-
yarn install
33-
yarn link
34-
yarn link webpack
35-
```
36-
37-
To run the entire test suite use:
38-
39-
```bash
40-
yarn test
41-
```
28+
[Setup your local webpack repository](_SETUP.md)
4229

4330
## Submitting Changes
4431

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<h1>webpack</h1>
3434
<p>
3535
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.
36-
<p>
36+
</p>
3737
</div>
3838

3939
<h2 align="center">Install</h2>
@@ -52,15 +52,15 @@ yarn add webpack --dev
5252

5353
<h2 align="center">Introduction</h2>
5454

55-
> This README reflects Webpack v2.x and v3.x. The Webpack v1.x documentation has been deprecated and deleted.
55+
> This README reflects webpack v2.x and v3.x. The webpack v1.x documentation has been deprecated and deleted.
5656
5757
webpack is a bundler for modules. The main purpose is to bundle JavaScript
5858
files for usage in a browser, yet it is also capable of transforming, bundling,
5959
or packaging just about any resource or asset.
6060

6161
**TL;DR**
6262

63-
* Bundles [ES Modules](http://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/) and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).
63+
* Bundles [ES Modules](http://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined).
6464
* Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time).
6565
* Dependencies are resolved during compilation, reducing the runtime size.
6666
* Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc.
@@ -70,6 +70,11 @@ or packaging just about any resource or asset.
7070

7171
Check out webpack's quick [**Get Started**](https://webpack.js.org/get-started/) guide and the [other guides](https://webpack.js.org/guides/).
7272

73+
### Browser Compatibility
74+
75+
webpack supports all browsers that are [ES5-compliant](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
76+
webpack also needs `Promise` for `import()` and `require.ensure()`. If you want to support older browsers, you will need to [load a polyfill](https://webpack.js.org/guides/shimming/) before using these expressions.
77+
7378
<h2 align="center">Concepts</h2>
7479

7580
### [Plugins](https://webpack.js.org/plugins/)
@@ -182,7 +187,7 @@ or are automatically applied via regex from your webpack configuration.
182187

183188
|Name|Status|Description|
184189
|:--:|:----:|:----------|
185-
|<a href="https://github.com/webpack/style-loader">`<style>`|![style-npm]|Add exports of a module as style to DOM|
190+
|<a href="https://github.com/webpack/style-loader">`<style>`</a>|![style-npm]|Add exports of a module as style to DOM|
186191
|<a href="https://github.com/webpack/css-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/css-3.svg"></a>|![css-npm]|Loads CSS file with resolved imports and returns CSS code|
187192
|<a href="https://github.com/webpack/less-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/less-63.svg"></a>|![less-npm]|Loads and compiles a LESS file|
188193
|<a href="https://github.com/jtangelder/sass-loader"><img width="48" height="48" src="https://worldvectorlogo.com/logos/sass-1.svg"></a>|![sass-npm]|Loads and compiles a SASS/SCSS file|
@@ -324,25 +329,13 @@ If you have discovered a 🐜 or have a feature suggestion, feel free to create
324329
<br>
325330
<p>Founder of the core team</p>
326331
</td>
327-
<td align="center" valign="top">
328-
<img width="150" height="150" src="https://github.com/bebraw.png?s=150">
329-
<br>
330-
<a href="https://github.com/bebraw">Juho Vepsäläinen</a>
331-
<p>Documentation</p>
332-
<br>
333-
<p>Author</p>
334-
<a href="https://leanpub.com/survivejs-webpack">
335-
<img height="15" src="https://cloud.githubusercontent.com/assets/1365881/20286923/93e325c0-aac9-11e6-964d-cabe218c584c.png">
336-
</a>
337-
<br>
338-
</td>
339332
<td align="center" valign="top">
340333
<img width="150" height="150" src="https://github.com/spacek33z.png?s=150">
341334
<br>
342335
<a href="https://github.com/spacek33z">Kees Kluskens</a>
343336
<p>Development</p>
344337
<br>
345-
<p>Sponsor<p>
338+
<p>Sponsor</p>
346339
<a href="https://codeyellow.nl/">
347340
<img height="15px" src="https://cloud.githubusercontent.com/assets/1365881/20286583/ad62eb04-aac7-11e6-9c14-a0fef35b9b56.png">
348341
</a>

0 commit comments

Comments
 (0)