Skip to content

Commit f66368f

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 72eec5f + 62ab32d commit f66368f

File tree

60 files changed

+2129
-1513
lines changed

Some content is hidden

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

60 files changed

+2129
-1513
lines changed

CHANGELOG.md

Lines changed: 69 additions & 118 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![npm](https://img.shields.io/npm/v/webpack-cli.svg)](https://www.npmjs.com/package/webpack-cli)
1212
[![Build Status](https://travis-ci.org/webpack/webpack-cli.svg)](https://travis-ci.org/webpack/webpack-cli)
1313
[![Build2 Status](https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli)](https://dev.azure.com/webpack/webpack/_build/latest?definitionId=4)
14-
[![Dependency Status](https://david-dm.org/webpack/webpack-cli.svg)](https://david-dm.org/webpack/webpack-cli)
14+
[![deps][deps]][deps-url]
1515
[![Code Climate](https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg)](https://codeclimate.com/github/webpack/webpack-cli)
1616
[![chat on gitter](https://badges.gitter.im/webpack/webpack.svg)](https://gitter.im/webpack/webpack)
1717
[![Install Size](https://packagephobia.now.sh/badge?p=webpack-cli)](https://packagephobia.now.sh/result?p=webpack-cli)
@@ -70,3 +70,5 @@ You can read more about [Scaffolding](./SCAFFOLDING.md) or check out the example
7070

7171
The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](CONTRIBUTING.md).
7272

73+
[deps]: https://img.shields.io/david/webpack/webpack.svg
74+
[deps-url]: https://david-dm.org/webpack/webpack-cli

SCAFFOLDING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ As with a regular webpack configuration, this property behaves the same. Inside
6060
```js
6161
this.options.env.configuration.dev.webpackOptions = {
6262
entry: '\'app.js\'',
63-
output: {....},
64-
merge: 'myConfig'
63+
output: {....}
6564
};
6665
```
67-
If you want to use `webpack-merge`, you can supply `webpackOptions` with the merge property, and the configuration you want to merge it with.
66+
67+
### `myObj.merge` (optional)
68+
69+
If you want to use `webpack-merge`, you can supply `merge` with the merge property, and the configuration you want to merge it with.
70+
71+
```js
72+
this.options.env.configuration.dev.merge = 'myConfig';
73+
```
6874

6975
### `myObj.topScope`(optional)
7076

azure-pipelines-template.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
jobs:
2+
- job: ${{ parameters.name }}
3+
pool:
4+
vmImage: ${{ parameters.vmImage }}
5+
strategy:
6+
maxParallel: 3
7+
matrix:
8+
node-10:
9+
node_version: ^10.10.0
10+
node-8:
11+
node_version: ^8.12.0
12+
node-6:
13+
node_version: ^6.14.4
14+
steps:
15+
- task: NodeTool@0
16+
displayName: "Install Node.js"
17+
inputs:
18+
versionSpec: $(node_version)
19+
- script: |
20+
npm install -g npm@latest
21+
displayName: "Install npm"
22+
- script: |
23+
npm install
24+
npm run bootstrap
25+
displayName: "Lerna bootstrap"
26+
- script: |
27+
npm run test
28+
displayName: "Run tests"
29+
- task: PublishTestResults@2
30+
displayName: 'Publish Test Results'
31+
inputs:
32+
testResultsFiles: '**junit*.xml'
33+
testRunTitle: TestRun $ {{ parameters.name }} $(node_version)
34+
- task: PublishCodeCoverageResults@1
35+
displayName: 'Publish code coverage results'
36+
inputs:
37+
codeCoverageTool: 'cobertura'
38+
summaryFileLocation: '**/coverage/cobertura-coverage.xml'

azure-pipelines.yml

Lines changed: 16 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,19 @@
11
jobs:
2-
- job: linux
3-
pool:
4-
vmImage: ubuntu-16.04
5-
strategy:
6-
maxParallel: 3
7-
matrix:
8-
node-10:
9-
node_version: ^10.10.0
10-
node-8:
11-
node_version: ^8.12.0
12-
node-6:
13-
node_version: ^6.14.4
14-
steps:
15-
- task: NodeTool@0
16-
displayName: "Install Node.js"
17-
inputs:
18-
versionSpec: $(node_version)
19-
- script: |
20-
npm install -g npm@latest
21-
displayName: "Install npm"
22-
- script: |
23-
npm ci
24-
displayName: "Install dependencies"
25-
- script: |
26-
./node_modules/.bin/lerna bootstrap
27-
displayName: "Lerna bootstrap"
28-
- script: |
29-
npm test
30-
displayName: "Run tests"
31-
- task: PublishTestResults@2
32-
displayName: 'Publish Test Results'
33-
inputs:
34-
testResultsFiles: '**junit*.xml'
35-
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
36-
- task: PublishCodeCoverageResults@1
37-
displayName: 'Publish code coverage results'
38-
inputs:
39-
codeCoverageTool: 'cobertura'
40-
summaryFileLocation: '**/coverage/cobertura-coverage.xml'
41-
- job: macos
42-
pool:
43-
vmImage: "macOS 10.13"
44-
strategy:
45-
maxParallel: 3
46-
matrix:
47-
node-10:
48-
node_version: ^10.10.0
49-
node-8:
50-
node_version: ^8.12.0
51-
steps:
52-
- task: NodeTool@0
53-
displayName: "Install Node.js"
54-
inputs:
55-
versionSpec: $(node_version)
56-
- script: |
57-
npm install -g npm@latest
58-
displayName: "Install npm"
59-
- script: |
60-
npm ci
61-
displayName: "Install dependencies"
62-
- script: |
63-
./node_modules/.bin/lerna bootstrap
64-
displayName: "Lerna bootstrap"
65-
- script: |
66-
npm test
67-
displayName: "Run tests"
68-
- task: PublishTestResults@2
69-
displayName: 'Publish Test Results'
70-
inputs:
71-
testResultsFiles: '**junit*.xml'
72-
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
73-
- task: PublishCodeCoverageResults@1
74-
displayName: 'Publish code coverage results'
75-
inputs:
76-
codeCoverageTool: 'cobertura'
77-
summaryFileLocation: '**/coverage/cobertura-coverage.xml'
78-
- job: windows
79-
pool:
80-
vmImage: vs2017-win2016
81-
strategy:
82-
maxParallel: 3
83-
matrix:
84-
node-8:
85-
node_version: ^8.12.0
86-
node-6:
87-
node_version: ^6.14.4
88-
steps:
89-
- task: NodeTool@0
90-
displayName: "Install Node.js"
91-
inputs:
92-
versionSpec: $(node_version)
93-
- script: |
94-
npm install -g npm@latest
95-
displayName: "Install npm"
96-
- script: |
97-
npm ci
98-
displayName: "Install dependencies"
99-
- script: |
100-
./node_modules/.bin/lerna.cmd bootstrap
101-
displayName: "Lerna bootstrap"
102-
- script: |
103-
npm test
104-
displayName: "Run tests"
105-
- task: PublishTestResults@2
106-
displayName: 'Publish Test Results'
107-
inputs:
108-
testResultsFiles: '**junit*.xml'
109-
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
110-
- task: PublishCodeCoverageResults@1
111-
displayName: 'Publish code coverage results'
112-
inputs:
113-
codeCoverageTool: 'cobertura'
114-
summaryFileLocation: '**coverage/cobertura-coverage.xml'
2+
- template: azure-pipelines-template.yml
3+
parameters:
4+
name: macOS
5+
vmImage: macOS-10.13
6+
7+
- template: azure-pipelines-template.yml
8+
parameters:
9+
name: Linux
10+
vmImage: ubuntu-16.04
11+
12+
# TODO: enable when windows symlinks in monorepos work...
13+
# - template: azure-pipelines-template.yml
14+
# parameters:
15+
# name: Windows
16+
# vmImage: vs2017-win2016
11517

11618
variables:
117-
nproc: 4
19+
nproc: 3

bin/cli.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
"migrate",
2424
"add",
2525
"remove",
26-
/*
27-
"update",
28-
"make",
29-
*/
3026
"serve",
3127
"generate-loader",
3228
"generate-plugin",
@@ -436,17 +432,17 @@ For more information, see https://webpack.js.org/api/cli/.`);
436432
if (argv.w) {
437433
compiler.hooks.watchRun.tap("WebpackInfo", compilation => {
438434
const compilationName = compilation.name ? compilation.name : "";
439-
console.log("\nCompilation " + compilationName + " starting…\n");
435+
console.error("\nCompilation " + compilationName + " starting…\n");
440436
});
441437
} else {
442438
compiler.hooks.beforeRun.tap("WebpackInfo", compilation => {
443439
const compilationName = compilation.name ? compilation.name : "";
444-
console.log("\nCompilation " + compilationName + " starting…\n");
440+
console.error("\nCompilation " + compilationName + " starting…\n");
445441
});
446442
}
447443
compiler.hooks.done.tap("WebpackInfo", compilation => {
448444
const compilationName = compilation.name ? compilation.name : "";
449-
console.log("\nCompilation " + compilationName + " finished\n");
445+
console.error("\nCompilation " + compilationName + " finished\n");
450446
});
451447
}
452448

@@ -491,8 +487,12 @@ For more information, see https://webpack.js.org/api/cli/.`);
491487
process.stdin.resume();
492488
}
493489
compiler.watch(watchOptions, compilerCallback);
494-
if (outputOptions.infoVerbosity !== "none") console.log("\nwebpack is watching the files…\n");
495-
} else compiler.run(compilerCallback);
490+
if (outputOptions.infoVerbosity !== "none") console.error("\nwebpack is watching the files…\n");
491+
if (compiler.close) compiler.close(compilerCallback);
492+
} else {
493+
compiler.run(compilerCallback);
494+
if (compiler.close) compiler.close(compilerCallback);
495+
}
496496
}
497497

498498
processOptions(options);

bin/convert-argv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module.exports = function(...args) {
7979
const ext = actualConfigFileName.replace(new RegExp(defaultConfigFileNames), "");
8080
configFiles.push({
8181
path: resolvedPath,
82-
ext,
82+
ext
8383
});
8484
}
8585
}

0 commit comments

Comments
 (0)