Skip to content

Commit

Permalink
Upgrade dependencies (source-academy#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelsl authored Jun 10, 2020
1 parent 28f5ad3 commit e1f8648
Show file tree
Hide file tree
Showing 6 changed files with 2,243 additions and 5,837 deletions.
14 changes: 11 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"presets": ["es2015", "stage-2"],
"plugins": []
}
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"arrowParens": "avoid",
"trailingComma": "none"
}
58 changes: 36 additions & 22 deletions javascript/generateTocHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ export const recursiveProcessTOC = (index, writeTo, option, toIndexFolder) => {
<div class="card card-inverse">
<div class="card-header" role="tab" id="index-${index + 1}">
<h5 class="mb-0">
<span class="collapsed" data-toggle="collapse" href="#index-collapse-${index +
1}" aria-expanded="false" aria-controls="index-collapse-${index +
1}">
<span class="collapsed" data-toggle="collapse" href="#index-collapse-${
index + 1
}" aria-expanded="false" aria-controls="index-collapse-${
index + 1
}">
<a href="${toIndexFolder}${chapterIndex}.html"> ${displayTitle}</a>
</span>
</h5>
Expand All @@ -135,9 +137,11 @@ export const recursiveProcessTOC = (index, writeTo, option, toIndexFolder) => {
<div class="card card-inverse">
<div class="card-header" role="tab" id="sidebar-${index + 1}">
<h5 class="mb-0">
<span class="collapsed" data-toggle="collapse" href="#sidebar-collapse-${index +
1}" aria-expanded="false" aria-controls="sidebar-collapse-${index +
1}">
<span class="collapsed" data-toggle="collapse" href="#sidebar-collapse-${
index + 1
}" aria-expanded="false" aria-controls="sidebar-collapse-${
index + 1
}">
<a href="${toIndexFolder}${chapterIndex}.html"> ${displayTitle}</a>
</span>
</h5>
Expand All @@ -159,45 +163,55 @@ export const recursiveProcessTOC = (index, writeTo, option, toIndexFolder) => {
<div class="card card-inverse">
<div class="card-header" role="tab" id="index-${index + 1}">
<h5 class="mb-0">
<a class="index-show collapsed" data-toggle="collapse" href="#index-collapse-${index +
1}" aria-expanded="true" aria-controls="index-collapse-${index +
1}">
<a class="index-show collapsed" data-toggle="collapse" href="#index-collapse-${
index + 1
}" aria-expanded="true" aria-controls="index-collapse-${
index + 1
}">
&#10148; <!-- ➤ (because this one is rendered blue on mobile: ▶ -->
</a>
<a class="index-hide collapsed" data-toggle="collapse" href="#index-collapse-${index +
1}" aria-expanded="true" aria-controls="index-collapse-${index +
1}">
<a class="index-hide collapsed" data-toggle="collapse" href="#index-collapse-${
index + 1
}" aria-expanded="true" aria-controls="index-collapse-${
index + 1
}">
&#x25BC; <!-- ▼ (because the corresponding one is not rendered) -->
</a>
<a href="${toIndexFolder}${chapterIndex}.html">${displayTitle}</a>
</h5>
</div>
<div id="index-collapse-${index +
1}" class="collapse" role="tabpanel" aria-labelledby="headingOne">
<div id="index-collapse-${
index + 1
}" class="collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="card-block">
`);
} else if (option == "sidebar") {
writeTo.push(`
<div class="card card-inverse">
<div class="card-header" role="tab" id="sidebar-${index + 1}">
<h5 class="mb-0">
<a class="sidebar-show collapsed" data-toggle="collapse" href="#sidebar-collapse-${index +
1}" aria-expanded="true" aria-controls="sidebar-collapse-${index +
1}">
<a class="sidebar-show collapsed" data-toggle="collapse" href="#sidebar-collapse-${
index + 1
}" aria-expanded="true" aria-controls="sidebar-collapse-${
index + 1
}">
&#10148; <!-- ➤ (because this one is rendered blue on mobile: ▶ -->
</a>
<a class="sidebar-hide collapsed" data-toggle="collapse" href="#sidebar-collapse-${index +
1}" aria-expanded="true" aria-controls="sidebar-collapse-${index +
1}">
<a class="sidebar-hide collapsed" data-toggle="collapse" href="#sidebar-collapse-${
index + 1
}" aria-expanded="true" aria-controls="sidebar-collapse-${
index + 1
}">
&#x25BC; <!-- ▼ (because the corresponding one is not rendered) -->
</a>
<a href="${toIndexFolder}${chapterIndex}.html">${displayTitle}</a>
</h5>
</div>
<div id="sidebar-collapse-${index +
1}" class="collapse" role="tabpanel" aria-labelledby="headingOne">
<div id="sidebar-collapse-${
index + 1
}" class="collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="card-block">
`);
}
Expand Down
Loading

0 comments on commit e1f8648

Please sign in to comment.