Skip to content

Commit

Permalink
Merge pull request #5300 from pierreneter/patch-1
Browse files Browse the repository at this point in the history
Fix #5213, set boolean options in config file.
  • Loading branch information
sokra committed Jul 23, 2017
2 parents 4c6eb6f + 7c8ad6e commit 4874584
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/config-yargs.js
Expand Up @@ -251,12 +251,14 @@ module.exports = function(yargs) {
"bail": {
type: "boolean",
describe: "Abort the compilation on first error",
group: ADVANCED_GROUP
group: ADVANCED_GROUP,
default: null
},
"profile": {
type: "boolean",
describe: "Profile the compilation and include information in stats",
group: ADVANCED_GROUP
group: ADVANCED_GROUP,
default: null
},
"d": {
type: "boolean",
Expand Down
1 change: 1 addition & 0 deletions test/binCases/configFile/profile/bar.js
@@ -0,0 +1 @@
console.log('bar');
3 changes: 3 additions & 0 deletions test/binCases/configFile/profile/foo.js
@@ -0,0 +1,3 @@
require('./bar');

console.log('foo');
1 change: 1 addition & 0 deletions test/binCases/configFile/profile/index.js
@@ -0,0 +1 @@
const foo = require('./foo');
12 changes: 12 additions & 0 deletions test/binCases/configFile/profile/test.js
@@ -0,0 +1,12 @@
"use strict";

module.exports = function testAssertions(code, stdout, stderr) {
code.should.be.exactly(0);

stdout.should.be.ok();
stdout[6].should.containEql("factory:");
stdout[8].should.containEql("factory:");
stdout[10].should.containEql("factory:");

stderr.should.be.empty();
};
6 changes: 6 additions & 0 deletions test/binCases/configFile/profile/webpack.config.js
@@ -0,0 +1,6 @@
var path = require("path");

module.exports = {
entry: path.resolve(__dirname, "./index"),
profile: true
};

0 comments on commit 4874584

Please sign in to comment.