moving step2-7 to bonus content

This commit is contained in:
Ken
2019-03-04 11:29:05 -08:00
parent a4097d417c
commit 6a15f0f6b6
14 changed files with 16 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
# Step 2.7: Service calls (Demo)
# Bonus: Service calls (Demo)
[Lessons](../)

View File

@@ -130,8 +130,16 @@
</div>
</div>
</li>
</ul>
</div>
<div class="Container">
<ul class="Tiles">
<li class="Tile Tile--intro">
<h2>Bonus Content</h2>
Some Extra Bonus Lessons!! Yay! Bonus!!
</li>
<li class="Tile Tile--numbered">
<a target="_blank" href="./step2-07/demo/" class="Tile-link">
<a target="_blank" href="./bonus-servicecalls/demo/" class="Tile-link">
Redux: Service Calls
</a>
</li>

View File

@@ -9,8 +9,12 @@ const outPath = path.resolve(__dirname, 'docs');
const entries = {};
const nonWebpackedEntries = [];
function isValidLessonFolder(folder) {
return folder.includes('step') || folder.includes('playground') || folder.includes('bonus');
}
function* getEntryPoint(step) {
if (step.includes('step') || step.includes('playground')) {
if (isValidLessonFolder(step)) {
for (let prefix of ['', 'demo/', 'exercise/', 'final/']) {
for (let suffix of ['.js', '.jsx', '.ts', '.tsx']) {
const entryRequest = `./${step}/${prefix}src/index${suffix}`;
@@ -34,7 +38,7 @@ fs.readdirSync('./').filter(step => {
}
}
if (!isEntryPoint && (step.includes('step') || step.includes('playground'))) {
if (!isEntryPoint && isValidLessonFolder(step)) {
nonWebpackedEntries.push(step);
}
});