diff --git a/levels/tower_of_knowledge/level.json b/levels/tower_of_knowledge/level.json index 19e5ba6..88f19f2 100644 --- a/levels/tower_of_knowledge/level.json +++ b/levels/tower_of_knowledge/level.json @@ -12,6 +12,7 @@ "fs-02-pwd", "fs-03-ls", "fs-04-cd", - "fs-05-mkdir" + "fs-05-mkdir", + "fs-12-cp" ] } diff --git a/levels/tower_of_knowledge/objectives/fs-12-cp/description.md b/levels/tower_of_knowledge/objectives/fs-12-cp/description.md new file mode 100644 index 0000000..041fea2 --- /dev/null +++ b/levels/tower_of_knowledge/objectives/fs-12-cp/description.md @@ -0,0 +1,25 @@ +<% const isWindows = context.systemInfo.os === 'win32'; %> + +# Copying Our Spoons + +
+

Requirements

+ +
+ +General content here... + +<% if(isWindows) { %> + +Windows specific content here... + +<% } else { %> + +\*nix specific content here... + +<% } %> diff --git a/levels/tower_of_knowledge/objectives/fs-12-cp/objective.json b/levels/tower_of_knowledge/objectives/fs-12-cp/objective.json new file mode 100644 index 0000000..ea3637d --- /dev/null +++ b/levels/tower_of_knowledge/objectives/fs-12-cp/objective.json @@ -0,0 +1,16 @@ +{ + "title": "Copying Our Spoons", + "description": "Copy the correct number of spoons to the same drawer directory.", + "validation_fields": [ + { + "name": "prompt", + "type": "prompt", + "placeholder": "", + "label": "Once you've copied all the spoons to the correct drawer directory, HACK away!" + } + ], + "show_ide": false, + "rewards": { + "xp": 100 + } +} diff --git a/levels/tower_of_knowledge/objectives/fs-12-cp/validator.js b/levels/tower_of_knowledge/objectives/fs-12-cp/validator.js new file mode 100644 index 0000000..25a667a --- /dev/null +++ b/levels/tower_of_knowledge/objectives/fs-12-cp/validator.js @@ -0,0 +1,18 @@ +const { existsSync } = require("fs"); + +module.exports = async function (helper) { + const { DEV_FUNDAMENTALS_FILE_SYSTEM_CUTLERY_DRAWER_DIR } = helper.env; + + try { + // TODO: Check for spoon in correct draw, check for mv in command history + } catch (err) { + helper.fail(`An error occurred while TwilioQuest was checking for the copied spoons. + + ${err}`); + return; + } + + helper.success( + "TwilioQuest found the copied spoons in the correct drawer directory! Good job!" + ); +}; diff --git a/levels/tower_of_knowledge/objectives/fs-12-cp/walkthrough.md b/levels/tower_of_knowledge/objectives/fs-12-cp/walkthrough.md new file mode 100644 index 0000000..90c9c4f --- /dev/null +++ b/levels/tower_of_knowledge/objectives/fs-12-cp/walkthrough.md @@ -0,0 +1,3 @@ +# Walkthrough + +Content here...