File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
33const fs = require ( 'fs' )
4- const inquirer = require ( 'inquirer' )
54const {
65 spawnSync,
76 getExerciseBranches,
@@ -23,7 +22,9 @@ async function go() {
2322 return
2423 }
2524
26- const { action} = await inquirer . prompt ( [
25+ const { action} = await (
26+ await import ( 'inquirer' )
27+ ) . default . prompt ( [
2728 {
2829 name : 'action' ,
2930 message : `What do you want to do?` ,
@@ -47,7 +48,9 @@ function getDisplayName(exerciseBranch) {
4748}
4849
4950async function changeExercise ( ) {
50- const { branch} = await inquirer . prompt ( [
51+ const { branch} = await (
52+ await import ( 'inquirer' )
53+ ) . default . prompt ( [
5154 {
5255 name : 'branch' ,
5356 message : `Which exercise do you want to start working on?` ,
@@ -86,7 +89,9 @@ async function startExtraCredit() {
8689 return `Extra Credit ${ variant } : ${ extraCreditTitles [ variant - 1 ] } `
8790 }
8891
89- const { variant} = await inquirer . prompt ( [
92+ const { variant} = await (
93+ await import ( 'inquirer' )
94+ ) . default . prompt ( [
9095 {
9196 name : 'variant' ,
9297 message : `Which part do you want to work on?` ,
Original file line number Diff line number Diff line change 11const fs = require ( 'fs' )
2- const inquirer = require ( 'inquirer' )
32const { spawnSync, getVariants, getExtraCreditTitles} = require ( './utils' )
43
54const branch = spawnSync ( 'git rev-parse --abbrev-ref HEAD' )
@@ -29,7 +28,9 @@ async function go() {
2928 const extraCreditTitles = getExtraCreditTitles ( )
3029
3130 if ( ! match ) {
32- const prompt = await inquirer . prompt ( [
31+ const prompt = await (
32+ await import ( 'inquirer' )
33+ ) . default . prompt ( [
3334 {
3435 name : 'matchVal' ,
3536 message : `Which modules do you want loaded?` ,
You can’t perform that action at this time.
0 commit comments