-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathgoingnative.js
44 lines (40 loc) · 943 Bytes
/
goingnative.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const Workshopper = require('workshopper-adventure')
const path = require('path')
const credits = require('./credits')
const menu = require('./exercises/menu')
const hooray = require('workshopper-hooray')
const more = require('workshopper-more')
const appname = 'goingnative'
const title = 'Going Native'
const subtitle = '\x1b[23mSelect an exercise and hit \x1b[3mEnter\x1b[23m to begin'
function fpath (f) {
return path.join(__dirname, f)
}
const workshopper = Workshopper({
name: appname,
title: title,
subtitle: subtitle,
exerciseDir: fpath('./exercises/'),
appDir: __dirname,
helpFile: fpath('help.txt'),
footerFile: false,
menu: {
fs: 'white',
bg: 'black'
},
menuItems: [
{
name: 'credits',
handler: credits
},
{
name: 'more',
menu: false,
short: 'm',
handler: more
}
],
onComplete: hooray
})
workshopper.addAll(menu)
module.exports = workshopper