Skip to content

Commit e44e71c

Browse files
committed
JS Basic
0 parents  commit e44e71c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+7638
-0
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
extends: ["plugin:react/recommended", "plugin:markdown/recommended"],
4+
plugins: ["@typescript-eslint", "react", "markdown"],
5+
overrides: [
6+
{
7+
files: ["**/*.md"],
8+
processor: "markdown/markdown",
9+
},
10+
{
11+
files: ["**/*.md/*.js"],
12+
rules: {
13+
"comma-dangle": ["error", "only-multiline"],
14+
},
15+
},
16+
],
17+
settings: {
18+
react: {
19+
version: "17.0.2",
20+
},
21+
},
22+
};

.github/workflows/gh-pages.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["master"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: 22
36+
- run: npm ci
37+
38+
- name: Build
39+
run: |
40+
npx reveal-md lessons/ --static dist --static-dirs=plugins
41+
rsync -a -r lessons/ dist/
42+
cp -r plugins dist/_assets/
43+
cp -r .reveal-md dist/_assets/
44+
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v3
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: "dist"
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/sanity-check.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR Sanity Check
2+
3+
on: pull_request
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
12+
- name: Install Packages
13+
run: |
14+
npm install
15+
- name: Lint
16+
run: |
17+
npm run lint
18+
- name: Build
19+
run: |
20+
npx reveal-md lessons/ --static dist
21+
rsync -a -r lessons/ dist/

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
.DS_Store
4+
.vscode
5+
.eslintcache
6+
tmp
7+
.idea

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.nojekyll

Whitespace-only changes.

.reveal-md/listing.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>{{pageTitle}}</title>
6+
<link rel="stylesheet" href="{{{themeUrl}}}" id="theme" />
7+
</head>
8+
9+
<body>
10+
<ul>
11+
{{#files}} {{#title}}
12+
<li>
13+
<a
14+
href="{{filePath}}"
15+
title="{{title}} - {{description}} ({{filePath}})"
16+
>
17+
{{#title}}{{.}} {{/title}}{{^title}}{{filePath}}{{/title}} -
18+
{{description}}
19+
</a>
20+
</li>
21+
{{/title}} {{/files}}
22+
</ul>
23+
</body>
24+
</html>

.reveal-md/styles.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.reveal {
2+
font-size: 36px;
3+
}
4+
5+
.reveal pre code {
6+
max-height: 80%;
7+
}
8+
9+
* {
10+
font-family: Helvetica, sans-serif !important;
11+
}
12+
13+
.table-of-contents h1 {
14+
font-size: 16px;
15+
}
16+
.table-of-contents {
17+
max-height: 95%;
18+
overflow-y: scroll;
19+
overflow: -moz-scrollbars-vertical;
20+
font-size: 14px;
21+
}
22+
23+
.section[data-markdown-parsed="true"] i {
24+
font-style: italic;
25+
}

0 commit comments

Comments
 (0)