Skip to content

Commit

Permalink
Update debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrii Kaledin committed May 29, 2017
1 parent 302aca9 commit 88d3971
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ function runWebpack(config) {
});
}

function runAva(emittedFiles, tap) {
function runAva(emittedFiles, tap, debug) {
return new Promise(function (resolve, reject) {
console.log('ava ' + (tap ? '--tap ' : '') + emittedFiles.join(' ') + ' --verbose');
if (!!debug) {
console.log('ava ' + (tap ? '--tap ' : '') + emittedFiles.join(' ') + ' --verbose');
}

exec('ava ' + (tap ? '--tap ' : '') + emittedFiles.join(' ') + ' --verbose', {}, function (err, stdout, stderr) {
var output = tap ? stdout : stderr;

Expand Down Expand Up @@ -140,7 +143,7 @@ function run(input, flags, showHelp) {
console.log(stats.toString({ colors: true }));
}

runAva(emittedFiles, flags.tap).then(
runAva(emittedFiles, flags.tap, flags.debug).then(
function(res) { return complete(res, false, cleanOutput); },
function(err) { return complete(err, true, cleanOutput); }
)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ava-webpack",
"version": "1.4.0",
"version": "1.4.1",
"description": "Crude webpack enabled runner for AVA",
"main": "index.js",
"scripts": {},
Expand All @@ -11,7 +11,7 @@
"url": "https://github.com/thrandre/ava-webpack/issues",
"license": "ISC",
"bin": "cli.js",
"repository": {
"repository": {
"type": "git",
"url": "https://github.com/thrandre/ava-webpack.git"
},
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ module.exports = {
"ava": "^0.19.1"
}
```
```

0 comments on commit 88d3971

Please sign in to comment.