Skip to content

Commit

Permalink
Addressed comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Shukla committed Oct 12, 2019
1 parent 5e972c1 commit e3306fc
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const showInstructions = kickStart => {
* Checks if there already is a directory called 'teachcode-solutions' in the present working directory
* and errors out if that is the case.
*/
const checkRedundantDirectory = () => {
const checkIfDirExists = () => {
if (
fs.existsSync(`${process.cwd()}/teachcode-solutions`) ||
fs.existsSync(`${process.cwd()}/config.json`)
Expand All @@ -67,19 +67,6 @@ const checkRedundantDirectory = () => {
console.log();
process.exit(1);
}

console.log();
console.log(
chalk.greenBright(
` Welcome to teachcode${`\n`.repeat(2)}${`\t`.repeat(
2,
)} Points to ponder ${`\n`.repeat(
4,
)} 1. Solution files are auto-created\n 2. Print out exactly what is required as given in the task\n 3. You have the provision to view previously submitted tasks ${`\n`.repeat(
4,
)}`,
),
);
};

/**
Expand All @@ -95,7 +82,20 @@ const initTasks = async () => {
);
console.log();

checkRedundantDirectory();
checkIfDirExists();

console.log();
console.log(
chalk.greenBright(
` Welcome to teachcode${`\n`.repeat(2)}${`\t`.repeat(
2,
)} Points to ponder ${`\n`.repeat(
4,
)} 1. Solution files are auto-created\n 2. Print out exactly what is required as given in the task\n 3. You have the provision to view previously submitted tasks ${`\n`.repeat(
4,
)}`,
),
);

const { learningTrackOfChoice } = await inquirer.prompt([
{
Expand Down

0 comments on commit e3306fc

Please sign in to comment.