forked from workshopper/stream-adventure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
23 lines (20 loc) · 757 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const path = require('path')
const workshopper = require('workshopper-adventure')
const util = require('workshopper-adventure/util')
const exerciseDir = path.join(__dirname, './problems')
const shop = workshopper({
name: 'stream-adventure',
title: 'STREAM ADVENTURE',
exerciseDir,
header: require('workshopper-adventure/default/header'),
footer: require('workshopper-adventure/default/footer'),
fail: require('workshopper-adventure/default/fail'),
pass: require('workshopper-adventure/default/pass'),
appDir: __dirname
})
require('./menu.json').forEach(function (name) {
const dir = util.dirFromName(exerciseDir, name)
const exerciseFile = path.join(dir, './index.js')
shop.add({ name, dir, exerciseFile })
})
module.exports = shop