-
Notifications
You must be signed in to change notification settings - Fork 1
/
playground.ts
25 lines (22 loc) · 841 Bytes
/
playground.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { createSelection, createPrompt } from './src'
const username = createPrompt("Enter username: ")
console.log(username.value)
const password = createPrompt("Enter password: ", {
echoMode: 'password'
})
console.log(password.value)
const result = createSelection([
{ text: 'feat', description: 'Introducing new features' },
{ text: 'fix', description: 'Bug fix' },
{ text: 'docs', description: 'Writing docs' },
{ text: 'style', description: 'Improving structure/format of the code' },
{ text: 'refactor', description: 'Refactoring code' },
{ text: 'test', description: 'Refactoring code' },
{ text: 'chore', description: 'When adding missing tests' },
{ text: 'perf', description: 'Improving performance' }
], {
headerText: 'Select Commit Type: ',
perPage: 5,
footerText: 'Footer here'
})
console.log(result)