From ee66d84ccb975b3fe4c1d118344625bd33440976 Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Mon, 21 May 2018 14:56:49 +0100 Subject: [PATCH] feat(package): Initial Curriculum separation (#17174) * feat(package): Initial Curriculum separation * feat(package): Add org scope to package * chore(ooops): Remove development file * feat(npm): Add .npmignore * fix(paths): Fix curriculum paths * feat(build): Add a build step * chore(seed): Move package file back to seed * fix(ignore): Fix .npmIgnore file * chore(docs): Update README * chore(seed): Rename coding interview blocks * fix(seed): Challenge files now fit into learn * chore(seed): Update seed files for use in learn * chore(escapes): Unescape script tags of jQuery --- .gitignore | 7 + .npmignore | 3 + README.md | 73 +- bonfireMDNlinks.js | 102 - .../applied-accessibility.json | 1853 +- .../applied-visual-design.json | 4422 +- .../01-responsive-web-design/basic-css.json | 6660 +-- .../basic-html-and-html5.json | 1632 +- .../01-responsive-web-design/css-flexbox.json | 1957 +- .../01-responsive-web-design/css-grid.json | 2006 +- .../responsive-web-design-projects.json | 168 +- .../responsive-web-design.json | 216 +- .../basic-algorithm-scripting.json | 1029 +- .../basic-data-structures.json | 1239 +- .../basic-javascript.json | 6886 ++- .../debugging.json | 558 +- .../es6.json | 1346 +- .../functional-programming.json | 2101 +- .../intermediate-algorithm-scripting.json | 1146 +- ...gorithms-and-data-structures-projects.json | 534 +- .../object-oriented-programming.json | 1294 +- .../regular-expressions.json | 1516 +- .../03-front-end-libraries/bootstrap.json | 3498 +- challenges/03-front-end-libraries/jquery.json | 1705 +- .../react-and-redux.json | 269 +- challenges/03-front-end-libraries/react.json | 1192 +- challenges/03-front-end-libraries/redux.json | 387 +- challenges/03-front-end-libraries/sass.json | 636 +- .../data-visualization-with-d3.json | 2920 +- .../json-apis-and-ajax.json | 1111 +- ...n => apis-and-microservices-projects.json} | 2 +- .../basic-node-and-express.json | 25 - .../managing-packages-with-npm.json | 25 - .../mongodb-and-mongoose.json | 66 - .../advanced-express-tools.json | 86 - ...urity-with-helmetjs.json => helmetjs.json} | 37 - ...-with-chai.json => testing-with-chai.json} | 19 - .../algorithms.json} | 621 +- .../data-structures.json | 3876 ++ .../project-euler-guide.md | 0 .../project-euler.json} | 20324 ++++---- .../rosetta-code.json | 5731 +++ .../take-home-projects.json} | 13 +- ...ng-interview-data-structure-questions.json | 2829 - .../rosetta-code-problems.json | 42462 ---------------- .../apis-and-microservices-certificate.json | 2 +- .../data-visualization-certificate.json | 2 +- .../front-end-libraries-certificate.json | 2 +- ...ity-and-quality-assurance-certificate.json | 2 +- ...ithms-and-data-structures-certificate.json | 2 +- .../legacy-back-end-certificate.json | 2 +- ...legacy-data-visualization-certificate.json | 2 +- .../legacy-front-end-certificate.json | 2 +- .../responsive-web-design-certificate.json | 2 +- ...te-to-open-source-and-help-nonprofits.json | 0 .../system-design-and-concept-questions.json | 0 get-challenge-completion.js | 53 - gulpfile.js | 29 + index.js | 6 +- normalize-seed-files.js | 137 - package-entry.js | 1 + package-lock.json | 5791 +++ package.json | 54 + requiresTests/project-euler-problems.json | 4033 ++ requiresTests/rosetta-code-problems.json | 38441 ++++++++++++++ schema/challengeSchema.js | 26 +- test-challenges.js | 70 +- unpackedChallenge.js | 8 +- utils.js | 7 + 69 files changed, 99780 insertions(+), 73476 deletions(-) create mode 100644 .gitignore create mode 100644 .npmignore delete mode 100644 bonfireMDNlinks.js rename challenges/05-apis-and-microservices/{api-and-microservice-projects.json => apis-and-microservices-projects.json} (99%) rename challenges/06-information-security-and-quality-assurance/{information-security-with-helmetjs.json => helmetjs.json} (90%) rename challenges/06-information-security-and-quality-assurance/{quality-assurance-and-testing-with-chai.json => testing-with-chai.json} (97%) rename challenges/{08-coding-interview-questions-and-take-home-assignments/coding-interview-algorithm-questions.json => 08-coding-interview-prep/algorithms.json} (52%) create mode 100644 challenges/08-coding-interview-prep/data-structures.json rename challenges/{08-coding-interview-questions-and-take-home-assignments => 08-coding-interview-prep}/project-euler-guide.md (100%) rename challenges/{08-coding-interview-questions-and-take-home-assignments/project-euler-problems.json => 08-coding-interview-prep/project-euler.json} (57%) create mode 100644 challenges/08-coding-interview-prep/rosetta-code.json rename challenges/{08-coding-interview-questions-and-take-home-assignments/take-home-interview-projects.json => 08-coding-interview-prep/take-home-projects.json} (98%) delete mode 100644 challenges/08-coding-interview-questions-and-take-home-assignments/coding-interview-data-structure-questions.json delete mode 100644 challenges/08-coding-interview-questions-and-take-home-assignments/rosetta-code-problems.json rename {challenges => formattingConversion}/07-contribute-to-open-source-and-help-nonprofits/contribute-to-open-source-and-help-nonprofits.json (100%) rename {challenges/08-coding-interview-questions-and-take-home-assignments => formattingConversion}/system-design-and-concept-questions.json (100%) delete mode 100644 get-challenge-completion.js create mode 100644 gulpfile.js delete mode 100644 normalize-seed-files.js create mode 100644 package-entry.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 requiresTests/project-euler-problems.json create mode 100644 requiresTests/rosetta-code-problems.json create mode 100644 utils.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..c1b093a726 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules + +dist +unpacked/ + +*.log +*.tgz \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000000..5bcece0a46 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +* +!dist/*.js +!dist/challenges/**/*.json \ No newline at end of file diff --git a/README.md b/README.md index d7cc18acfe..d40669838c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,73 @@ +## freeCodeCamp Curriculum -This directory contains code and data to "seed" the Mongo database with challenges. +This package contains the "seed" files used in the freeCodeCamp Curriculum. + +### Installation + +```sh +npm i @freecodecamp/curriculum +# or +yarn add @freecodecamp/curriculum +``` + +### Usage + +```js +import { getChallenges } from '@freecodecamp/curriculum'; + +getChallenges() // will provide an array of blocks i.e. basic CSS, functional programming + +``` +#### `block` Structure + +```json +{ + "name": "ES6", + "order": 2, + "time": "5 hours", + "helpRoom": "Help", + "challenges": [/**/], + "fileName": "02-javascript-algorithms-and-data-structures/es6.json", + "superBlock": "javascript-algorithms-and-data-structures", + "superOrder": 2 +} +``` + +#### `challenge` Structure + +```json +{ + "id": "ObjectId()", + "title": "Declare a Read-Only Variable with the const Keyword", + "description": [ + "A Description of the challenge and what is required to pass" + ], + "tests": [ + { + "text": "should return \"foo\"", + "testString": "a stringified function using Chai asserts" + } + ], + "challengeType": 1, + "translations": {}, + "files": { + "indexjs": { + "key": "indexjs", + "ext": "js", + "name": "index", + "contents": [ + "Initial editor seed" + ], + "head": [ + "A place for test set up", + "Can be thought of as mocha's beforeEach()" + ], + "tail": [ + "A place for test tear down", + "Can be thought of as mocha's afterEach()" + ] + } + } +}, +``` -See the main [CONTRIBUTING](../CONTRIBUTING.md) file for instructions and details. diff --git a/bonfireMDNlinks.js b/bonfireMDNlinks.js deleted file mode 100644 index ea496375ab..0000000000 --- a/bonfireMDNlinks.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * MDN Links - * - * These links are for Bonfires. Each key/value pair is used to render a Bonfire with appropriate links. - * The text of the key is what the link text will be, e.g. Global Array Object - * General convention is to use the page title of the MDN reference page. - * - **/ - -var links = { - // ========= NON MDN REFS - "Currying": "https://leanpub.com/javascript-allonge/read#pabc", - "Smallest Common Multiple": "https://www.mathsisfun.com/least-common-multiple.html", - "Permutations": "https://www.mathsisfun.com/combinatorics/combinations-permutations.html", - "HTML Entities": "http://dev.w3.org/html5/html-author/charref", - "Symmetric Difference": "https://www.youtube.com/watch?v=PxffSUQRkG4", - "Roman Numerals": "http://www.mathsisfun.com/roman-numerals.html", - "Floating Point Guide": "http://floating-point-gui.de", - - // ========= GLOBAL OBJECTS - "Global Array Object": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", - "Global Object": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", - "Global String Object": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", - "Boolean Objects": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", - "RegExp": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", - "Global Function Object": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", - "Arguments object": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments", - "Closures": "https://developer.mozilla.org/en-US/docs/" + - "Web/JavaScript/Closures", - - // ========= GLOBAL OBJECT METHODS - "parseInt()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt", - - - // ========= PROPERTIES/MISC - "String.length": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length", - - - // ========== OBJECT METHODS - "Object.getOwnPropertyNames()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames", - "Object.keys()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys", - "Object.prototype.hasOwnProperty()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty", - - - // ======== STRING METHODS - "String.prototype.charAt()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt", - "String.prototype.charCodeAt()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt", - "String.prototype.concat()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat", - "String.prototype.indexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf", - "String.fromCharCode()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode", - "String.prototype.lastIndexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf", - "String.prototype.match()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match", - "String.prototype.replace()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace", - "String.prototype.slice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice", - "String.prototype.split()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split", - "String.prototype.substring()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring", - "String.prototype.substr()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr", - "String.prototype.toLowerCase()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase", - "String.prototype.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toString", - "String.prototype.toUpperCase()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase", - - // ======== ARRAY METHODS - "Array.prototype.concat()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat", - "Array.prototype.every()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every", - "Array.prototype.filter()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter", - "Array.prototype.forEach()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach", - "Array.prototype.indexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf", - "Array.isArray()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray", - "Array.prototype.join()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join", - "Array.prototype.lastIndexOf()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf", - "Array.prototype.map()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map", - "Array.prototype.pop()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop", - "Array.prototype.push()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push", - "Array.prototype.reduce()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce", - "Array.prototype.reverse()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse", - "Array.prototype.shift()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift", - "Array.prototype.slice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice", - "Array.prototype.some()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some", - "Array.prototype.sort()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort", - "Array.prototype.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice", - "Array.prototype.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString", - - // ======== STATEMENTS AND DECLARATIONS - "Switch Statement": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch", - - // ======== MATH METHODS - "Math.max()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max", - "Math.min()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min", - "Math.pow()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow", - "Remainder": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Remainder", - - // ======== GENERAL JAVASCRIPT REFERENCES - "Arithmetic Operators": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators", - "Comparison Operators": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators", - "Strict Inequality Operator": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Non-identity_strict_inequality_(!)", - "Details of the Object Model": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model", - "For Loops": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for", - "Truthy": "https://developer.mozilla.org/en-US/docs/Glossary/Truthy", - "Falsy": "https://developer.mozilla.org/en-US/docs/Glossary/Falsy" -}; - -module.exports = links; diff --git a/challenges/01-responsive-web-design/applied-accessibility.json b/challenges/01-responsive-web-design/applied-accessibility.json index 0135397eb6..ad12e3bbf5 100644 --- a/challenges/01-responsive-web-design/applied-accessibility.json +++ b/challenges/01-responsive-web-design/applied-accessibility.json @@ -4,37 +4,6 @@ "time": "5 hours", "helpRoom": "Help", "challenges": [ - { - "id": "587d774b367417b2b2512a9b", - "title": "Introduction to the Applied Accessibility Challenges", - "description": [ - [ - "", - "", - "\"Accessibility\" generally means having web content and a user interface that can be understood, navigated, and interacted with by a broad audience. This includes people with visual, auditory, mobility, or cognitive disabilities.", - "" - ], - [ - "", - "", - "Websites should be open and accessible to everyone, regardless of a user's abilities or resources. Some users rely on assistive technology such as a screen reader or voice recognition software. Other users may be able to navigate through a site only using a keyboard. Keeping the needs of various users in mind when developing your project can go a long way towards creating an open web.", - "" - ], - [ - "", - "", - "Here are three general concepts this section will explore throughout the following challenges:


  1. have well-organized code that uses appropriate markup

  2. ensure text alternatives exist for non-text and visual content

  3. create an easily-navigated page that's keyboard-friendly



Having accessible web content is an ongoing challenge. A great resource for your projects going forward is the W3 Consortium's Web Content Accessibility Guidelines (WCAG). They set the international standard for accessibility and provide a number of criteria you can use to check your work.", - "" - ] - ], - "releasedOn": "Feb 17, 2017", - "challengeSeed": [], - "tests": [], - "type": "waypoint", - "challengeType": 7, - "isRequired": false, - "translations": {} - }, { "id": "587d774c367417b2b2512a9c", "title": "Add a Text Alternative to Images for Visually Impaired Accessibility", @@ -46,11 +15,11 @@ "
", "Camper Cat happens to be both a coding ninja and an actual ninja, and is building a website to share his knowledge. The profile picture he wants to use shows his skills, and should be appreciated by all site visitors. Add an alt attribute in the img tag, that explains Camper Cat is doing karate. (The image src doesn't link to an actual file, so you should see the alt text in the display.)" ], - "challengeSeed": [ - "" - ], "tests": [ - "assert($('img').attr('alt'), 'message: Your img tag should have an alt attribute, and it should not be empty.');" + { + "text": "Your img tag should have an alt attribute, and it should not be empty.", + "testString": "assert($('img').attr('alt'), 'Your img tag should have an alt attribute, and it should not be empty.');" + } ], "solutions": [], "hints": [], @@ -58,7 +27,19 @@ "releasedOn": "Feb 17, 2017", "challengeType": 0, "translations": {}, - "guideUrl": "https://guide.freecodecamp.org/certificates/add-alt-text-to-an-image-for-accessibility" + "guideUrl": "https://guide.freecodecamp.org/certificates/add-alt-text-to-an-image-for-accessibility", + "files": { + "indexhtml": { + "key": "indexhtml", + "ext": "html", + "name": "index", + "contents": [ + "" + ], + "head": [], + "tail": [] + } + } }, { "id": "587d774c367417b2b2512a9d", @@ -72,30 +53,45 @@ "
", "Camper Cat has coded a skeleton page for the blog part of his website. He's planning to add a visual break between his two articles with a decorative image of a samurai sword. Add an alt attribute to the img tag and set it to an empty string. (Note that the image src doesn't link to an actual file - don't worry that there are no swords showing in the display.)" ], - "challengeSeed": [ - "

Deep Thoughts with Master Camper Cat

", - "
", - "

Defeating your Foe: the Red Dot is Ours!

", - "

To Come...

", - "
", - "", - "", - "", - "
", - "

Is Chuck Norris a Cat Person?

", - "

To Come...

", - "
" - ], "tests": [ - "assert(!($('img').attr('alt') == undefined), 'message: Your img tag should have an alt attribute.');", - "assert($('img').attr('alt') == '', 'message: The alt attribute should be set to an empty string.');" + { + "text": "Your img tag should have an alt attribute.", + "testString": "assert(!($('img').attr('alt') == undefined), 'Your img tag should have an alt attribute.');" + }, + { + "text": "The alt attribute should be set to an empty string.", + "testString": "assert($('img').attr('alt') == '', 'The alt attribute should be set to an empty string.');" + } ], "solutions": [], "hints": [], "type": "waypoint", "releasedOn": "Feb 17, 2017", "challengeType": 0, - "translations": {} + "translations": {}, + "files": { + "indexhtml": { + "key": "indexhtml", + "ext": "html", + "name": "index", + "contents": [ + "

Deep Thoughts with Master Camper Cat

", + "
", + "

Defeating your Foe: the Red Dot is Ours!

", + "

To Come...

", + "
", + "", + "", + "", + "
", + "

Is Chuck Norris a Cat Person?

", + "

To Come...

", + "
" + ], + "head": [], + "tail": [] + } + } }, { "id": "587d774d367417b2b2512a9e", @@ -110,25 +106,15 @@ "
", "Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix the headings so his markup gives semantic meaning to the content, and shows the proper parent-child relationships of his sections. Change all the h5 tags to the proper heading level to indicate they are subsections of the h2 ones." ], - "challengeSeed": [ - "

How to Become a Ninja

", - "
", - "

Learn the Art of Moving Stealthily

", - "
How to Hide in Plain Sight
", - "
How to Climb a Wall
", - "", - "

Learn the Art of Battle

", - "
How to Strengthen your Body
", - "
How to Fight like a Ninja
", - "", - "

Learn the Art of Living with Honor

", - "
How to Breathe Properly
", - "
How to Simplify your Life
", - "
" - ], "tests": [ - "assert($('h3').length === 6, 'message: Your code should have six h3 tags.');", - "assert($('h5').length === 0, 'message: Your code should not have any h5 tags.');" + { + "text": "Your code should have six h3 tags.", + "testString": "assert($('h3').length === 6, 'Your code should have six h3 tags.');" + }, + { + "text": "Your code should not have any h5 tags.", + "testString": "assert($('h5').length === 0, 'Your code should not have any h5 tags.');" + } ], "solutions": [], "hints": [ @@ -137,7 +123,32 @@ "type": "waypoint", "releasedOn": "Feb 17, 2017", "challengeType": 0, - "translations": {} + "translations": {}, + "files": { + "indexhtml": { + "key": "indexhtml", + "ext": "html", + "name": "index", + "contents": [ + "

How to Become a Ninja

", + "
", + "

Learn the Art of Moving Stealthily

", + "
How to Hide in Plain Sight
", + "
How to Climb a Wall
", + "", + "

Learn the Art of Battle

", + "
How to Strengthen your Body
", + "
How to Fight like a Ninja
", + "", + "

Learn the Art of Living with Honor

", + "
How to Breathe Properly
", + "
How to Simplify your Life
", + "
" + ], + "head": [], + "tail": [] + } + } }, { "id": "587d774e367417b2b2512a9f", @@ -150,25 +161,40 @@ "
", "Camper Cat has some big ideas for his ninja weapons page. Help him set up his markup by adding opening and closing main tags between the header and footer (covered in other challenges). Keep the main tags empty for now." ], - "challengeSeed": [ - "
", - "

Weapons of the Ninja

", - "
", - "", - "", - "", - "
" - ], "tests": [ - "assert($('main').length == 1, 'message: Your code should have one main tag.');", - "assert(code.match(/<\\/header>\\s*?
\\s*?<\\/main>/gi), 'message: The main tags should be between the closing header tag and the opening footer tag.');" + { + "text": "Your code should have one main tag.", + "testString": "assert($('main').length == 1, 'Your code should have one main tag.');" + }, + { + "text": "The main tags should be between the closing header tag and the opening footer tag.", + "testString": "assert(code.match(/<\\/header>\\s*?
\\s*?<\\/main>/gi), 'The main tags should be between the closing header tag and the opening footer tag.');" + } ], "solutions": [], "hints": [], "type": "waypoint", "releasedOn": "Feb 17, 2017", "challengeType": 0, - "translations": {} + "translations": {}, + "files": { + "indexhtml": { + "key": "indexhtml", + "ext": "html", + "name": "index", + "contents": [ + "
", + "

Weapons of the Ninja

", + "
", + "", + "", + "", + "
" + ], + "head": [], + "tail": [] + } + } }, { "id": "587d774e367417b2b2512aa0", @@ -182,39 +208,54 @@ "
", "Camper Cat used article tags to wrap the posts on his blog page, but he forgot to use them around the top one. Change the div tag to use an article tag instead." ], - "challengeSeed": [ - "

Deep Thoughts with Master Camper Cat

", - "
", - "
", - "

The Garfield Files: Lasagna as Training Fuel?

", - "

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

", - "
", - "", - " \"\"", - "", - "
", - "

Defeating your Foe: the Red Dot is Ours!

", - "

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightening speed. But chin up, fellow fighters, our time for victory may soon be near...

", - "
", - "", - " \"\"", - "", - "
", - "

Is Chuck Norris a Cat Person?

", - "

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

", - "
", - "
" - ], "tests": [ - "assert($('article').length == 3, 'message: Your code should have three article tags.');", - "assert($('div').length == 0, 'message: Your code should not have any div tags.');" + { + "text": "Your code should have three article tags.", + "testString": "assert($('article').length == 3, 'Your code should have three article tags.');" + }, + { + "text": "Your code should not have any div tags.", + "testString": "assert($('div').length == 0, 'Your code should not have any div tags.');" + } ], "solutions": [], "hints": [], "type": "waypoint", "releasedOn": "Feb 17, 2017", "challengeType": 0, - "translations": {} + "translations": {}, + "files": { + "indexhtml": { + "key": "indexhtml", + "ext": "html", + "name": "index", + "contents": [ + "

Deep Thoughts with Master Camper Cat

", + "
", + "
", + "

The Garfield Files: Lasagna as Training Fuel?

", + "

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

", + "
", + "", + " \"\"", + "", + "
", + "

Defeating your Foe: the Red Dot is Ours!

", + "

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightening speed. But chin up, fellow fighters, our time for victory may soon be near...

", + "
", + "", + " \"\"", + "", + "
", + "

Is Chuck Norris a Cat Person?

", + "

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

", + "
", + "
" + ], + "head": [], + "tail": [] + } + } }, { "id": "587d7787367417b2b2512aa1", @@ -226,45 +267,66 @@ "
", "Camper Cat is writing some great articles about ninja training, and wants to add a page for them to his site. Change the top div that currently contains the h1 to a header tag instead." ], - "challengeSeed": [ - "", - "", - "
", - "

Training with Camper Cat

", - "
", - "", - "", - "
", - "
", - "

Stealth & Agility Training

", - "

Climb foliage quickly using a minimum spanning tree approach

", - "

No training is NP-complete without parkour

", - "
", - "
", - "

Combat Training

", - "

Dispatch multiple enemies with multithreaded tactics

", - "

Goodbye world: 5 proven ways to knock out an opponent

", - "
", - "
", - "

Weapons Training

", - "

Swords: the best tool to literally divide and conquer

", - "

Breadth-first or depth-first in multi-weapon training?

", - "
", - "
", - "" - ], "tests": [ - "assert($('header').length == 1, 'message: Your code should have one header tag.');", - "assert($('header').children('h1').length == 1, 'message: Your header tags should wrap around the h1.');", - "assert($('div').length == 0, 'message: Your code should not have any div tags.');", - "assert(code.match(/<\\/header>/g) && code.match(/<\\/header>/g).length === code.match(/
/g).length, 'message: Make sure your header element has a closing tag.');" + { + "text": "Your code should have one header tag.", + "testString": "assert($('header').length == 1, 'Your code should have one header tag.');" + }, + { + "text": "Your header tags should wrap around the h1.", + "testString": "assert($('header').children('h1').length == 1, 'Your header tags should wrap around the h1.');" + }, + { + "text": "Your code should not have any div tags.", + "testString": "assert($('div').length == 0, 'Your code should not have any div tags.');" + }, + { + "text": "Make sure your header element has a closing tag.", + "testString": "assert(code.match(/<\\/header>/g) && code.match(/<\\/header>/g).length === code.match(/
/g).length, 'Make sure your header element has a closing tag.');" + } ], "solutions": [], "hints": [], "type": "waypoint", "releasedOn": "Feb 17, 2017", "challengeType": 0, - "translations": {} + "translations": {}, + "files": { + "indexhtml": { + "key": "indexhtml", + "ext": "html", + "name": "index", + "contents": [ + "", + "", + "
", + "

Training with Camper Cat

", + "
", + "", + "", + "
", + "
", + "

Stealth & Agility Training

", + "

Climb foliage quickly using a minimum spanning tree approach

", + "

No training is NP-complete without parkour

", + "
", + "
", + "

Combat Training

", + "

Dispatch multiple enemies with multithreaded tactics

", + "

Goodbye world: 5 proven ways to knock out an opponent

", + "
", + "
", + "

Weapons Training

", + "

Swords: the best tool to literally divide and conquer

", + "

Breadth-first or depth-first in multi-weapon training?

", + "
", + "
", + "" + ], + "head": [], + "tail": [] + } + } }, { "id": "587d7788367417b2b2512aa2", @@ -275,51 +337,72 @@ "
", "Camper Cat included navigation links at the top of his training page, but wrapped them in a div. Change the div to a nav tag to improve the accessibility on his page." ], - "challengeSeed": [ - "", - "
", - "

Training with Camper Cat

", - "", - "
", - " ", - "
", - "", - "
", - "
", - "
", - "

Stealth & Agility Training

", - "

Climb foliage quickly using a minimum spanning tree approach

", - "

No training is NP-complete without parkour

", - "
", - "
", - "

Combat Training

", - "

Dispatch multiple enemies with multithreaded tactics

", - "

Goodbye world: 5 proven ways to knock out an opponent

", - "
", - "
", - "

Weapons Training

", - "

Swords: the best tool to literally divide and conquer

", - "

Breadth-first or depth-first in multi-weapon training?

", - "
", - "
", - "" - ], "tests": [ - "assert($('nav').length == 1, 'message: Your code should have one nav tag.');", - "assert($('nav').children('ul').length == 1, 'message: Your nav tags should wrap around the ul and its list items.');", - "assert($('div').length == 0, 'message: Your code should not have any div tags.');", - "assert(code.match(/<\\/nav>/g) && code.match(/<\\/nav>/g).length === code.match(/