#!/usr/bin/env node
'use strict'

const join = require('path').join
const GitAddAndCommit = require(join(__dirname, '../src/git-add-and-commit'))

let options = {}
let args = process.argv.slice(2)

if (args.includes('-i') || args.includes('--interactive')) {
	options.interactive = true
}
if (args.includes('-h') || args.includes('--help')) {
	options.help = true
}

new GitAddAndCommit(options)

#!/usr/bin/env node
'use strict'

const join = require('path').join
const minimist = require('minimist')
const GitAddAndCommit = require(join(__dirname, '../src/git-add-and-commit'))

let args = Object.keys(minimist(process.argv.slice(2)))
let options = {
	caseInsensitive: true
}

if (args.includes('h') || args.includes('help')) {
	options.help = true
}
if (args.includes('i') || args.includes('interactive')) {
	options.interactive = true
}
if (args.includes('c') || args.includes('case-sensitive')) {
	options.caseInsensitive = false
}

new GitAddAndCommit(options)

Use minimist