enspiral-dev-academy / curator

tool for building curriculum
GNU Affero General Public License v3.0
0 stars 0 forks source link

Stories in Ready

curator

npm install -g eda-curator

Tool for building language specific curriculum readme files for challenge repos.

The curator can initialize a directory with given languages, say ruby and c#; this will produce a _templates directory with one template.md file, an rb directory and a cs directory:

name_of_directory/_templates/rb/

name_of_directory/_templates/cs/

name_of_directory/_templates/template.md

Inside each of the language directories you can put any language specific files, it gets initialized with a default file selection of code.md,links.md and text.md:

name_of_directory/_templates/rb/code.md

name_of_directory/_templates/rb/links.md

name_of_directory/_templates/rb/text.md

If you have a challenge that needs two separate examples of code, one for ruby and one for c#, put the code you want for each inside the name_of_directory/_templates/rb/code.md and name_of_directory/_templates/cs/code.md.

Next up in the template.md put the language agnostic information, e.g the challenge name and it's brief.

To include the language specific code that you put into the code.md files just put include:code: on the next line. When you build curator with rb and c# it will scan the template file for include:*:, create a readme-rb.md and a readme-cs.md and then replace include:code: with the contents of the name_of_directory/_templates/rb/code.md file and copy that into the readme-rb.md file and the same for c# into the readme-cs.md.

Any include:*: in the template.md file will be replaced with the corresponding *.md file from the language directory. If you have multiple code examples or language specific text for the challenge then just create a file for each one in the language directory and put include:< file name >: in the template.md file.

Note: if you have include:code_one: and include:code_two: and one of the languages only has code_one.md, don't worry it will just replace include:code_two: with a blank :)

init

curator init < language name >

curator init rb cs js
curator init -A

build

curator build < language name >

curator build rb cs js
curator build -A