-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.js
37 lines (28 loc) · 964 Bytes
/
setup.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
const { installPackages, removeMiscellaneousFiles } = require('./runner-utils/setup-actions');
removeMiscellaneousFiles();
installPackages();
const childProcess = require('child_process');
const inquirer = require('inquirer');
const clear = require('clear');
const gitTools = require('./runner-utils/gitTools');
gitTools.setupInitialBranch();
gitTools.setUpWorkspaceBranch();
console.log('\nSetup is complete.\n\n');
inquirer.prompt([
{
name: 'startForms',
type: 'list',
choices: ['yes', 'no'],
message: 'Would you like to run the forms now?'
}
])
.then(function (responses) {
const startForms = responses.startForms;
if (startForms === 'yes') {
childProcess.fork('./start.js');
} else {
clear();
console.log('In the future, to run JS Learner Forms, run the command "npm start".\n');
console.log('See you next time!\n');
}
});