Skip to content

Commit 4874584

Browse files
authored
Merge pull request webpack#5300 from pierreneter/patch-1
Fix webpack#5213, set boolean options in config file.
2 parents 4c6eb6f + 7c8ad6e commit 4874584

6 files changed

Lines changed: 27 additions & 2 deletions

File tree

bin/config-yargs.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,14 @@ module.exports = function(yargs) {
251251
"bail": {
252252
type: "boolean",
253253
describe: "Abort the compilation on first error",
254-
group: ADVANCED_GROUP
254+
group: ADVANCED_GROUP,
255+
default: null
255256
},
256257
"profile": {
257258
type: "boolean",
258259
describe: "Profile the compilation and include information in stats",
259-
group: ADVANCED_GROUP
260+
group: ADVANCED_GROUP,
261+
default: null
260262
},
261263
"d": {
262264
type: "boolean",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('bar');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require('./bar');
2+
3+
console.log('foo');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const foo = require('./foo');
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"use strict";
2+
3+
module.exports = function testAssertions(code, stdout, stderr) {
4+
code.should.be.exactly(0);
5+
6+
stdout.should.be.ok();
7+
stdout[6].should.containEql("factory:");
8+
stdout[8].should.containEql("factory:");
9+
stdout[10].should.containEql("factory:");
10+
11+
stderr.should.be.empty();
12+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var path = require("path");
2+
3+
module.exports = {
4+
entry: path.resolve(__dirname, "./index"),
5+
profile: true
6+
};

0 commit comments

Comments
 (0)