Created
January 31, 2018 15:47
-
-
Save chesster/d4fa365d0b5b0e5926381fb0d4fd71bb to your computer and use it in GitHub Desktop.
sade test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const app = require('sade')('alert-toolkit'); | |
app | |
.version('1.0.0') | |
.option('--environment, -e', 'Environment to execute on', 'aslive') | |
.command('delete <id>') | |
.describe('Delete an alert with the given <id>') | |
.example('delete 5a706f760649b300124ccd83 -e aslive ') | |
.action((id, opts) => { | |
console.log(`delete, ${id}!`); | |
}) | |
.command('backup <id>') | |
.describe('Backup an alert with the given <id>') | |
.option('-o, --output', 'Change the name of the output file', 'backup.json') | |
.example('backup 5a706f760649b300124ccd83 -e aslive -o kosciuszko.json') | |
.action(opts => { | |
console.log(`deleteALL`); | |
}) | |
.command('backup-all') | |
.describe('Backup all alerts') | |
.option('-o, --output', 'Change the name of the output file', 'backup.json') | |
.example('backup -e live -o kosciuszko.json') | |
.action(opts => { | |
console.log(`backupALL`); | |
}) | |
.command('regenerate-query <id>') | |
.describe('Regenerate for a profile alert with the given <id>') | |
.example('regenerate-query-for-all-profile-alerts -e live') | |
.action(opts => { | |
console.log(`regenerate-query, ${id}!`); | |
}) | |
.command('regenerate-query-for-all') | |
.describe('Regenerate for all profile alerts') | |
.example('regenerate-query-for-all-profile-alerts -e live') | |
.action(opts => { | |
console.log(`regenerate-query-for-all`); | |
}) | |
app.parse(process.argv); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment