bin/taggit
#!/usr/bin/env node
/**
* Command line interface of taggit.
* This file is auto generated by ape-tmpl.
*/
'use strict'
const program = require('commander')
const pkg = require('../package')
const taggit = require('../lib')
program
.version(pkg[ 'version' ])
.usage('[options] ')
.description(pkg[ 'description' ])
.option('-t, --tag <tag>', 'Name of tag. By default, name is resolved form package.json.')
.option('-c, --cwd <cwd>', 'Working directory path.')
program.parse(process.argv)
// Run main command
taggit.apply(taggit, program.args.concat({
tag: program.tag,
cwd: program.cwd})
).catch(handleError)
// Handlers
/** Handle error */
function handleError (err) {
console.error(err)
process.exit(1)
}