-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add egg-bin autod --check
command
#70
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
const Command = require('../command'); | ||
|
||
class AutodCommand extends Command { | ||
constructor(rawArgv) { | ||
super(rawArgv); | ||
this.usage = 'Usage: egg-bin autod'; | ||
this.options = { | ||
check: { | ||
description: 'dependencies checker', | ||
}, | ||
}; | ||
} | ||
|
||
get description() { | ||
return 'Generate pkg.dependencies and pkg.devDependencies automatically'; | ||
} | ||
|
||
* run({ cwd, argv }) { | ||
const args = []; | ||
if (argv.check) args.push('--check'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 感觉直接把 rawArgs 给他就好了 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. usage 提示哪里怎么办? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. usage 可以放着,参数让 autod 提示? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 如果以后 autod 用了 common-bin,就可以继承了 |
||
const autodBin = require.resolve('autod/bin/autod.js'); | ||
yield this.helper.forkNode(autodBin, args, { cwd }); | ||
} | ||
} | ||
|
||
module.exports = AutodCommand; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这不加 check 就自动生成了,ci 才需要加 check