Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Feb 27, 2019
2 parents 72eec5f + 62ab32d commit f66368f
Show file tree
Hide file tree
Showing 60 changed files with 2,129 additions and 1,513 deletions.
187 changes: 69 additions & 118 deletions CHANGELOG.md

Large diffs are not rendered by default.

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

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).

[deps]: https://img.shields.io/david/webpack/webpack.svg
[deps-url]: https://david-dm.org/webpack/webpack-cli
12 changes: 9 additions & 3 deletions SCAFFOLDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ As with a regular webpack configuration, this property behaves the same. Inside
```js
this.options.env.configuration.dev.webpackOptions = {
entry: '\'app.js\'',
output: {....},
merge: 'myConfig'
output: {....}
};
```
If you want to use `webpack-merge`, you can supply `webpackOptions` with the merge property, and the configuration you want to merge it with.

### `myObj.merge` (optional)

If you want to use `webpack-merge`, you can supply `merge` with the merge property, and the configuration you want to merge it with.

```js
this.options.env.configuration.dev.merge = 'myConfig';
```

### `myObj.topScope`(optional)

Expand Down
38 changes: 38 additions & 0 deletions azure-pipelines-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 3
matrix:
node-10:
node_version: ^10.10.0
node-8:
node_version: ^8.12.0
node-6:
node_version: ^6.14.4
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm install
npm run bootstrap
displayName: "Lerna bootstrap"
- script: |
npm run test
displayName: "Run tests"
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**junit*.xml'
testRunTitle: TestRun $ {{ parameters.name }} $(node_version)
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '**/coverage/cobertura-coverage.xml'
130 changes: 16 additions & 114 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,117 +1,19 @@
jobs:
- job: linux
pool:
vmImage: ubuntu-16.04
strategy:
maxParallel: 3
matrix:
node-10:
node_version: ^10.10.0
node-8:
node_version: ^8.12.0
node-6:
node_version: ^6.14.4
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm ci
displayName: "Install dependencies"
- script: |
./node_modules/.bin/lerna bootstrap
displayName: "Lerna bootstrap"
- script: |
npm test
displayName: "Run tests"
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**junit*.xml'
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '**/coverage/cobertura-coverage.xml'
- job: macos
pool:
vmImage: "macOS 10.13"
strategy:
maxParallel: 3
matrix:
node-10:
node_version: ^10.10.0
node-8:
node_version: ^8.12.0
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm ci
displayName: "Install dependencies"
- script: |
./node_modules/.bin/lerna bootstrap
displayName: "Lerna bootstrap"
- script: |
npm test
displayName: "Run tests"
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**junit*.xml'
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '**/coverage/cobertura-coverage.xml'
- job: windows
pool:
vmImage: vs2017-win2016
strategy:
maxParallel: 3
matrix:
node-8:
node_version: ^8.12.0
node-6:
node_version: ^6.14.4
steps:
- task: NodeTool@0
displayName: "Install Node.js"
inputs:
versionSpec: $(node_version)
- script: |
npm install -g npm@latest
displayName: "Install npm"
- script: |
npm ci
displayName: "Install dependencies"
- script: |
./node_modules/.bin/lerna.cmd bootstrap
displayName: "Lerna bootstrap"
- script: |
npm test
displayName: "Run tests"
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**junit*.xml'
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '**coverage/cobertura-coverage.xml'
- template: azure-pipelines-template.yml
parameters:
name: macOS
vmImage: macOS-10.13

- template: azure-pipelines-template.yml
parameters:
name: Linux
vmImage: ubuntu-16.04

# TODO: enable when windows symlinks in monorepos work...
# - template: azure-pipelines-template.yml
# parameters:
# name: Windows
# vmImage: vs2017-win2016

variables:
nproc: 4
nproc: 3
18 changes: 9 additions & 9 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
"migrate",
"add",
"remove",
/*
"update",
"make",
*/
"serve",
"generate-loader",
"generate-plugin",
Expand Down Expand Up @@ -436,17 +432,17 @@ For more information, see https://webpack.js.org/api/cli/.`);
if (argv.w) {
compiler.hooks.watchRun.tap("WebpackInfo", compilation => {
const compilationName = compilation.name ? compilation.name : "";
console.log("\nCompilation " + compilationName + " starting…\n");
console.error("\nCompilation " + compilationName + " starting…\n");
});
} else {
compiler.hooks.beforeRun.tap("WebpackInfo", compilation => {
const compilationName = compilation.name ? compilation.name : "";
console.log("\nCompilation " + compilationName + " starting…\n");
console.error("\nCompilation " + compilationName + " starting…\n");
});
}
compiler.hooks.done.tap("WebpackInfo", compilation => {
const compilationName = compilation.name ? compilation.name : "";
console.log("\nCompilation " + compilationName + " finished\n");
console.error("\nCompilation " + compilationName + " finished\n");
});
}

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

processOptions(options);
Expand Down
2 changes: 1 addition & 1 deletion bin/convert-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = function(...args) {
const ext = actualConfigFileName.replace(new RegExp(defaultConfigFileNames), "");
configFiles.push({
path: resolvedPath,
ext,
ext
});
}
}
Expand Down
Loading

0 comments on commit f66368f

Please sign in to comment.