1 | #!/usr/bin/env node
|
2 | 'use strict';
|
3 | const meow = require('meow');
|
4 | const inquirer = require('inquirer');
|
5 | const clipboardy = require('clipboardy');
|
6 |
|
7 |
|
8 | const 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 |
|
27 | const 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 |
|
45 | inquirer.prompt(questions).then(answers => {
|
46 | const res =
|
47 | `
|
48 | :triumph: **\`What did I accomplish yesterday\`**
|
49 | ${answers.yesterday}
|
50 | :scream_cat: **\`What will I do today\`**
|
51 | ${answers.today}
|
52 | :cry: **\`What obstacles are impeding my progress? Any info I need or want to share?\`**
|
53 | ${answers.obstacles}
|
54 | `;
|
55 | console.log(res);
|
56 | clipboardy.writeSync(res);
|
57 | console.log('Copied the result to the clipboard!');
|
58 | });
|