-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curriculum change: track sequence (round 1) #590
Merged
SleeplessByte
merged 11 commits into
exercism:master
from
SleeplessByte:chore/round-1-curriculum
Jan 25, 2019
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
67af1ba
Reorder exercises according to Round 1
SleeplessByte a89762f
Demote prime-factors from core to side exercise
SleeplessByte b3058e1
Update simple-cipher difficulty
SleeplessByte c608c75
Add helper binaries for printing the tree of exercises
SleeplessByte dfd12e5
Fix the script to include core exercises that don't unlock anything
SleeplessByte d07fc9f
nit: junction for the last item in the list
SleeplessByte 732a917
Re-assign prime-factors unlocks
SleeplessByte 7b076e2
Reorder based on mentor-notes, examples and conversation
SleeplessByte 858bd05
Remove .gitattributes
SleeplessByte 632dd29
Tweak difficulties
SleeplessByte 98dacaf
Update config.json orderering to match track
SleeplessByte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env node | ||
|
||
const { exercises } = require('../config.json') | ||
const TAG_CORE = '__core' | ||
const TAG_BONUS = '__bonus' | ||
|
||
// node inter-opt exports | ||
exports.TAG_CORE = TAG_CORE | ||
exports.TAG_BONUS = TAG_BONUS | ||
|
||
exports.tree = exercises.reduce((result, exercise) => { | ||
const tag = exercise.slug | ||
const item = { | ||
slug: tag, | ||
difficulty: exercise.difficulty, | ||
} | ||
|
||
if (exercise.core) { | ||
const current = result[TAG_CORE] || [] | ||
|
||
if (result[tag]) { | ||
console.warn(`${tag} is not ordered correctly in config.json`) | ||
} | ||
|
||
return { | ||
...result, | ||
__core: current.concat([item]), | ||
[tag]: result[tag] || [] | ||
} | ||
} | ||
|
||
const parent = exercise.unlocked_by || TAG_BONUS | ||
const current = result[parent] || [] | ||
return { ...result, [parent]: current.concat([item]) } | ||
}, {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env node | ||
|
||
const actions = require('./generate-config-tree') | ||
|
||
const { tree, TAG_BONUS, TAG_CORE } = actions | ||
const { [TAG_BONUS]: __bonus, [TAG_CORE]: __core, ...track } = tree | ||
|
||
function printLn(line) { | ||
process.stdout.write(`${line}\n`) | ||
} | ||
|
||
function printList(items) { | ||
items.forEach(item => { | ||
printLn(`- ${item.slug} (${item.difficulty})`) | ||
}) | ||
} | ||
|
||
printLn('Core (matches config.json) of this track:') | ||
printList(__core) | ||
printLn('\n') | ||
printLn('core') | ||
printLn('----') | ||
Object.keys(track).forEach(slug => { | ||
printLn(`├─ ${slug}`) | ||
track[slug].forEach((side, index, self) => { | ||
junction = index === self.length - 1 ? '└─' : '├─' | ||
printLn(`│ ${junction} ${side.slug} (${side.difficulty})`) | ||
}) | ||
printLn('│') | ||
}) | ||
|
||
printLn('bonus') | ||
printLn('----') | ||
printList(__bonus) | ||
SleeplessByte marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍