Skip to content

Commit

Permalink
chore: use debug
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 committed Aug 29, 2017
1 parent db01134 commit 476ea11
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/cmd/cov.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore next */
'use strict';

const debug = require('debug')('egg-bin:cov');
const debug = require('debug')('egg-bin');
const path = require('path');
const rimraf = require('mz-modules/rimraf');
const testExclude = require('test-exclude');
Expand Down
2 changes: 1 addition & 1 deletion lib/cmd/dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const debug = require('debug')('egg-bin:dev');
const debug = require('debug')('egg-bin');
const Command = require('../command');
const path = require('path');
const utils = require('egg-utils');
Expand Down
2 changes: 1 addition & 1 deletion lib/cmd/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const debug = require('debug')('egg-bin:test');
const debug = require('debug')('egg-bin');
const fs = require('fs');
const path = require('path');
const globby = require('globby');
Expand Down
3 changes: 2 additions & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const BaseCommand = require('common-bin');
const changeCase = require('change-case');
const parser = require('yargs-parser');
const debug = require('debug')('egg-bin');

class Command extends BaseCommand {
/**
Expand All @@ -23,7 +24,7 @@ class Command extends BaseCommand {

// extract from WebStorm env `$NODE_DEBUG_OPTION`
if (context.env.NODE_DEBUG_OPTION) {
console.log('Use $NODE_DEBUG_OPTION: %s', context.env.NODE_DEBUG_OPTION);
debug('Use $NODE_DEBUG_OPTION: %s', context.env.NODE_DEBUG_OPTION);
const argvFromEnv = parser(context.env.NODE_DEBUG_OPTION);
debugPort = findDebugPort(argvFromEnv);
Object.assign(execArgvObj, extractExecArgv(argvFromEnv));
Expand Down

0 comments on commit 476ea11

Please sign in to comment.