mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
apply formatter to commander
This commit is contained in:
@@ -8,28 +8,28 @@
|
||||
import program = require("commander");
|
||||
|
||||
program
|
||||
.version('0.0.1')
|
||||
.option('-C, --chdir <path>', 'change the working directory')
|
||||
.option('-c, --config <path>', 'set config path [./deploy.conf]')
|
||||
.option('-T, --no-tests', 'ignore test hook')
|
||||
.version('0.0.1')
|
||||
.option('-C, --chdir <path>', 'change the working directory')
|
||||
.option('-c, --config <path>', 'set config path [./deploy.conf]')
|
||||
.option('-T, --no-tests', 'ignore test hook')
|
||||
|
||||
// $ deploy setup stage
|
||||
// $ deploy setup
|
||||
program
|
||||
.command('setup [env]')
|
||||
.description('run setup commands for all envs')
|
||||
.action(function (env?) {
|
||||
env = env || 'all';
|
||||
console.log('setup for %s env(s)', env);
|
||||
});
|
||||
.command('setup [env]')
|
||||
.description('run setup commands for all envs')
|
||||
.action(function (env?) {
|
||||
env = env || 'all';
|
||||
console.log('setup for %s env(s)', env);
|
||||
});
|
||||
|
||||
// $ deploy stage
|
||||
// $ deploy production
|
||||
program
|
||||
.command('*')
|
||||
.action(function (env?) {
|
||||
console.log('deploying "%s"', env);
|
||||
});
|
||||
.command('*')
|
||||
.action(function (env?) {
|
||||
console.log('deploying "%s"', env);
|
||||
});
|
||||
|
||||
program.option('-p, --pepper', 'add pepper');
|
||||
|
||||
@@ -43,8 +43,11 @@ program.prompt('Description:', function (desc) {
|
||||
console.log('description was "%s"', desc.trim());
|
||||
});
|
||||
|
||||
program.promptForNumber("Enter a number:", (n) => { });
|
||||
program.promptForNumber("Enter a number:", (n) => {
|
||||
});
|
||||
|
||||
program.confirm("Confirm? ", (f) => { });
|
||||
program.confirm("Confirm? ", (f) => {
|
||||
});
|
||||
|
||||
program.choose(["a", "b", "c"], (i) => { });
|
||||
program.choose(["a", "b", "c"], (i) => {
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user