UNPKG

421 BJavaScriptView Raw
1#!/usr/bin/env node
2
3const inquirer = require('inquirer')
4const simple = require('..')
5const confirm = require('inquirer-confirm')
6const hr = require('hr')
7const ggit = require('ggit')
8
9simple.prompter(inquirer, function (text) {
10 console.log('formed the following commit message')
11 hr.hr('=')
12 console.log(text)
13 hr.hr('-')
14
15 confirm('Do you want to commit?')
16 .then(ggit.commit.bind(null, text))
17 .done()
18})