Skip to content

Commit

Permalink
feat: use unparseArgv from common-bin (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored Mar 21, 2017
1 parent dd08876 commit da41b8e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
3 changes: 1 addition & 2 deletions lib/cmd/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const debug = require('debug')('egg-bin:test');
const fs = require('fs');
const path = require('path');
const globby = require('globby');
const unparse = require('dargs');
const Command = require('../command');

class TestCommand extends Command {
Expand Down Expand Up @@ -95,7 +94,7 @@ class TestCommand extends Command {
newArgv.t = undefined;
newArgv.g = undefined;

return unparse(newArgv);
return this.helper.unparseArgv(newArgv);
}
}

Expand Down
6 changes: 0 additions & 6 deletions lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@

const BaseCommand = require('common-bin');
const changeCase = require('change-case');
const helper = require('./helper');

class Command extends BaseCommand {
constructor(rawArgv) {
super(rawArgv);
Object.assign(this.helper, helper);
}

/**
* normalize context
* @param {Object} context - { cwd, argv, rawArgv }
Expand Down
18 changes: 0 additions & 18 deletions lib/helper.js

This file was deleted.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
"dependencies": {
"change-case": "^3.0.1",
"co-mocha": "^1.2.0",
"common-bin": "^2.1.0",
"dargs": "^5.1.0",
"common-bin": "^2.2.0",
"debug": "^2.6.3",
"detect-port": "^1.1.0",
"detect-port": "^1.1.1",
"egg-utils": "^2.1.0",
"glob": "^7.1.1",
"globby": "^6.1.0",
"intelli-espower-loader": "^1.0.1",
"is-type-of": "^1.0.0",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^3.2.0",
"mz-modules": "^1.0.0",
Expand All @@ -34,7 +31,7 @@
"cross-env": "^3.1.3",
"egg-ci": "^1.5.0",
"enzyme": "^2.0.0",
"eslint": "^3.17.1",
"eslint": "^3.18.0",
"eslint-config-egg": "^3.2.0",
"jsdom": "^8.0.1",
"mm": "^2.1.0",
Expand Down

0 comments on commit da41b8e

Please sign in to comment.