Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created a
generate-exercises.js
which creates thesrc/Exercises
folder that currently exists. However, one difference to the old structure ofsrc/Exercises
is that it creates anindex.js
in the root ofsrc/Exercises
which is exported toApp.js
so we don't have to maintain a manual list any more.generate-exercises.js
takes the inputs in the./exercises
folder, looks for references to block names enclosed in<!--block-->
tags in the exercise .md and then locates a matching block name in theblocks-to-categories.json
in order to generate the toolbox for that exercise.blocks-to-categories.json
should be maintained as a list of identifiable blocks ID'd by human readable names which teachers can use inside their exercise .md.The
package.json
has also been updated so that the exercises are automatically generated whenever anyone runsnpm run start/build/test
.What's not included in this PR is a README of how to add exercises and how this process works. If approval is granted and we're happy with this approach, I'll add a commit to create a README with instructions.
View rendered client/exercises/01-stuff.md
View rendered client/exercises/02-more-stuff.md
View rendered client/exercises/03-test-content.md
View rendered client/src/Exercises/01-stuff/lesson.md
View rendered client/src/Exercises/02-more-stuff/lesson.md