mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
moving step2-7 to bonus content
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Step 2.7: Service calls (Demo)
|
||||
# Bonus: Service calls (Demo)
|
||||
|
||||
[Lessons](../)
|
||||
|
||||
10
index.html
10
index.html
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user