UNPKG

1.44 kBJavaScriptView Raw
1#!/usr/bin/env node
2'use strict';
3const meow = require('meow');
4const inquirer = require('inquirer');
5const clipboardy = require('clipboardy');
6
7// eslint-disable-next-line no-unused-vars
8const cli = meow(`
9 Usage
10 standup-boy
11
12 Examples
13 $ standup-boy
14 ? What did I accomplish yesterday? Something!
15 ? What will I do today? Something Else!
16 ? What obstacles are impeding my progress? Any info I need or want to share? Not much...
17
18 :triumph: **\`What did I accomplish yesterday\`**
19 Something!
20 :scream_cat: **\`What will I do today\`**
21 Something Else!
22 :cry: **\`What obstacles are impeding my progress? Any info I need or want to share?\`**
23 Not much...
24 Copied the result to the clipboard!
25`);
26
27const questions = [
28 {
29 type: 'input',
30 name: 'yesterday',
31 message: 'What did I accomplish yesterday?'
32 },
33 {
34 type: 'input',
35 name: 'today',
36 message: 'What will I do today?'
37 },
38 {
39 type: 'input',
40 name: 'obstacles',
41 message: 'What obstacles are impeding my progress? Any info I need or want to share?'
42 }
43];
44
45inquirer.prompt(questions).then(answers => {
46 const res =
47 `:triumph: **\`What did I accomplish yesterday\`**
48${answers.yesterday}
49:scream_cat: **\`What will I do today\`**
50${answers.today}
51:cry: **\`What obstacles are impeding my progress? Any info I need or want to share?\`**
52${answers.obstacles}`;
53 console.log(res);
54 clipboardy.writeSync(res);
55 console.log('Copied the result to the clipboard!');
56});