Skip to content
This repository was archived by the owner on Jun 4, 2019. It is now read-only.

Generate challenges.json #19

Merged
merged 1 commit into from
May 27, 2017

Conversation

Ethan-Arrowood
Copy link
Member

@Ethan-Arrowood Ethan-Arrowood commented May 27, 2017

Big PR right here. Going to update README.md after this for proper way to submit challenges.
Ref #8 #2

  1. Challenge object within challenges.json now reflects chapter & lesson order (nested arrays).
  2. Challenge directories with a lesson number > 9 will increment using the alphabet.
    Reason: due to an auto sort in fs.readdirSync('./challenges') when directories have double digits in the <lesson_number> portion of their name they are bumped up via the first digit (1 is followed by 10, then 11, then 12, then 2, 20, 21, 22, . . .). This creates a bug when generating the challenge list for challenges.json
  3. Updated load-challenges.js to work with new challenges.json format (nested arrays).
    Also checks the last_edit date of the challenge.json against the localStorage challenge.json to verify integrity.

Some cool features included within generate-challenge-settings.js

  • Will auto add new lessons [Not chapters yet]

  • Will auto update existing challenges

  • Uses included FS module of Node.js so can be executed using npm [will add]

@Ethan-Arrowood Ethan-Arrowood merged commit 0b0b774 into freeCodeCamp:master May 27, 2017
@Ethan-Arrowood Ethan-Arrowood mentioned this pull request May 27, 2017
31 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant