Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 1 addition & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,7 @@ refresh_concept_fixtures:
gsed -i '1s/^/export default /' mirage/concept-fixtures/*.js

refresh_course_fixtures:
gh api repos/codecrafters-io/build-your-own-redis/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/redis.js

gh api repos/codecrafters-io/build-your-own-docker/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/docker.js

gh api repos/codecrafters-io/build-your-own-git/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/git.js

gh api repos/codecrafters-io/build-your-own-sqlite/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/sqlite.js

gh api repos/codecrafters-io/build-your-own-grep/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/grep.js

gh api repos/codecrafters-io/build-your-own-dummy/contents/course-definition.yml \
| jq -r .content \
| base64 -d \
| yq -o json eval \
> mirage/course-fixtures/dummy.js

gsed -i '1s/^/export default /' mirage/course-fixtures/*.js
./scripts/refresh-course-fixtures.sh

serve:
npm run start
24 changes: 12 additions & 12 deletions mirage/course-fixtures/docker.js

Large diffs are not rendered by default.

35 changes: 22 additions & 13 deletions mirage/course-fixtures/dummy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ export default {
"slug": "dummy",
"name": "Build your own Dummy",
"short_name": "dummy",
"release_status": "alpha",
"release_status": "live",
"description_md": "Add a description for your course here.",
"short_description_md": "Add a short description for your course here.",
"completion_percentage": 15,
"completion_message_markdown": "Congratulations! You've completed all stages of this course. 🎉\nWe recommend you to take a break and celebrate your achievement!",
"languages": [
{
"slug": "c"
},
{
"slug": "go"
},
Expand All @@ -16,6 +19,12 @@ export default {
},
{
"slug": "rust"
},
{
"slug": "java"
},
{
"slug": "javascript"
}
],
"marketing": {
Expand Down Expand Up @@ -56,39 +65,39 @@ export default {
"slug": "ah7",
"name": "The first stage",
"difficulty": "very_easy",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.\n\nHere's a sample table:\n\n| Column 1 Header | Column 2 Header | Column 3 Header |\n| --------------- | --------------- | --------------- |\n| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |\n| Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |\n| Row 3, Col 1 | Row 3, Col 2 | Row 3, Col 3 |\n\nAnd a new edit that must be synced automatically",
"marketing_md": "In this stage, we'll do XYZ."
"marketing_md": "In this stage, we'll do XYZ.",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.\n\nHere's a sample table:\n\n| Column 1 Header | Column 2 Header | Column 3 Header |\n| --------------- | --------------- | --------------- |\n| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |\n| Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |\n| Row 3, Col 1 | Row 3, Col 2 | Row 3, Col 3 |\n\nAnd a new edit that must be synced automatically"
},
{
"slug": "lr7",
"name": "The second stage",
"difficulty": "very_easy",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.",
"marketing_md": "In this stage, we'll do XYZ."
"marketing_md": "In this stage, we'll do XYZ.",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD."
},
{
"slug": "qh7",
"primary_extension_slug": "ext1",
"name": "Start with ext1",
"difficulty": "very_easy",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.",
"marketing_md": "In this stage, we'll do XYZ."
"marketing_md": "In this stage, we'll do XYZ.",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD."
},
{
"slug": "wd5",
"primary_extension_slug": "ext1",
"name": "Finish with ext1",
"difficulty": "very_easy",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.",
"marketing_md": "In this stage, we'll do XYZ."
"marketing_md": "In this stage, we'll do XYZ.",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD."
},
{
"slug": "ae0",
"primary_extension_slug": "ext2",
"name": "Start with ext2",
"difficulty": "very_easy",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.",
"marketing_md": "In this stage, we'll do XYZ."
"marketing_md": "In this stage, we'll do XYZ.",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD."
},
{
"slug": "um4",
Expand All @@ -98,8 +107,8 @@ export default {
],
"name": "Finish with ext1 + ext2",
"difficulty": "very_easy",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD.",
"marketing_md": "In this stage, we'll do XYZ."
"marketing_md": "In this stage, we'll do XYZ.",
"description_md": "In this stage, we'll do XYZ\n\n**Example:** ABC\n\nYour program will be executed like this:\n\n```bash\n$ echo \"apple\" | ./your_executable.sh -E \"a\"\n```\n\nYou program must ABCD."
}
]
}
28 changes: 14 additions & 14 deletions mirage/course-fixtures/git.js

Large diffs are not rendered by default.

Loading