Skip to content

Commit 1f55fd2

Browse files
author
Isaac Ramirez
committed
Add workshop files.
1 parent d70c29d commit 1f55fd2

File tree

131 files changed

+31554
-0
lines changed

Some content is hidden

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

131 files changed

+31554
-0
lines changed

workshop/.github/codeql.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Code Scanning - Action"
2+
enabled: false
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
# ┌───────────── minute (0 - 59)
8+
# │ ┌───────────── hour (0 - 23)
9+
# │ │ ┌───────────── day of the month (1 - 31)
10+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
11+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
12+
# │ │ │ │ │
13+
# │ │ │ │ │
14+
# │ │ │ │ │
15+
# * * * * *
16+
- cron: '30 1 * * 0'
17+
18+
jobs:
19+
CodeQL-Build:
20+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
- uses: volta-cli/action@v1
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@v1
29+
with:
30+
languages: javascript
31+
- run: yarn
32+
- run: yarn build
33+
- name: Perform CodeQL Analysis
34+
uses: github/codeql-action/analyze@v1

workshop/.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
versioning-strategy: widen
13+
open-pull-requests-limit: 20
+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
name: Website
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- 'packages/website/**'
8+
- '.github/**'
9+
- 'package.json'
10+
- 'yarn.lock'
11+
push:
12+
branches: [main]
13+
paths:
14+
- 'packages/website/**'
15+
- '.github/**'
16+
- 'package.json'
17+
- 'yarn.lock'
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: volta-cli/action@v1
24+
- name: restore lerna
25+
uses: actions/cache@v2
26+
with:
27+
path: |
28+
node_modules
29+
*/*/node_modules
30+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
31+
- run: |
32+
yarn
33+
yarn lerna bootstrap
34+
- name: Build
35+
run: yarn lerna run build --scope website
36+
- name: Lint
37+
run: yarn lerna run lint --scope website
38+
- name: Test
39+
run: yarn lerna run test --scope website
40+
41+
os-compatibility:
42+
needs: build
43+
runs-on: ${{ matrix.os }}
44+
strategy:
45+
matrix:
46+
os:
47+
# - macos-latest
48+
- windows-latest
49+
steps:
50+
- uses: actions/checkout@v2
51+
- uses: volta-cli/action@v1
52+
- name: restore lerna
53+
uses: actions/cache@v2
54+
with:
55+
path: |
56+
node_modules
57+
*/*/node_modules
58+
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
59+
- run: |
60+
yarn
61+
yarn lerna bootstrap
62+
- name: Build
63+
run: yarn lerna run build --scope website
64+
- name: Test
65+
run: yarn lerna run test --scope website
66+
67+
node-compatibility:
68+
needs: build
69+
runs-on: ubuntu-latest
70+
71+
strategy:
72+
matrix:
73+
node-version: [14.x, 16.x]
74+
steps:
75+
- uses: actions/checkout@v2
76+
- uses: volta-cli/action@v1
77+
with:
78+
node-version: ${{ matrix.node-version }}
79+
- name: restore lerna
80+
uses: actions/cache@v2
81+
with:
82+
path: |
83+
node_modules
84+
*/*/node_modules
85+
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
86+
- run: |
87+
yarn
88+
yarn lerna bootstrap
89+
- name: Build
90+
run: yarn lerna run build --scope website
91+
- name: Test
92+
run: yarn lerna run test --scope website
93+
94+
95+
ts-compatibility:
96+
needs: build
97+
runs-on: ubuntu-latest
98+
continue-on-error: ${{ matrix.experimental }}
99+
strategy:
100+
matrix:
101+
typescript-version: ['~4.2.0', '~4.3.0', '~4.4.0','~4.5.0', latest, next, beta, rc]
102+
include:
103+
- typescript-version: '~4.2.0'
104+
experimental: false
105+
name: 'ts-4.2'
106+
- typescript-version: '~4.3.0'
107+
experimental: false
108+
name: 'ts-4.3'
109+
- typescript-version: '~4.4.0'
110+
experimental: false
111+
name: 'ts-4.4'
112+
- typescript-version: '~4.5.0'
113+
experimental: false
114+
name: 'ts-4.5'
115+
- typescript-version: latest
116+
experimental: false
117+
name: 'ts-stable'
118+
- typescript-version: beta
119+
experimental: false
120+
name: 'ts-beta'
121+
- typescript-version: rc
122+
experimental: true
123+
name: 'ts-rc'
124+
- typescript-version: next
125+
experimental: true
126+
name: 'ts-canary'
127+
128+
129+
steps:
130+
- uses: actions/checkout@v2
131+
- uses: volta-cli/action@v1
132+
- name: restore lerna
133+
uses: actions/cache@v2
134+
with:
135+
path: |
136+
node_modules
137+
*/*/node_modules
138+
key: ${{ runner.os }}-${{ matrix.typescript-version }}-${{ hashFiles('**/yarn.lock') }}
139+
- run: |
140+
yarn
141+
yarn lerna bootstrap
142+
- name: Installing TypeScript ${{ matrix.typescript-version }}
143+
run: |
144+
yarn lerna add -D typescript@${{ matrix.typescript-version}}
145+
- name: Build
146+
run: yarn lerna run build --scope website
147+
- name: TypeScript compile
148+
run: |
149+
yarn replace-in-file 'import chalk' 'import * as chalk' node_modules/gatsby-cli/lib/reporter/reporter.d.ts
150+
yarn lerna run typecheck --scope website
151+
- name: Test
152+
run: yarn lerna run test --scope website
153+
154+
publish:
155+
needs: [build, os-compatibility, node-compatibility, ts-compatibility]
156+
runs-on: ubuntu-latest
157+
if: success() && github.ref == 'refs/heads/main'
158+
steps:
159+
- uses: actions/checkout@v1
160+
- uses: volta-cli/action@v1
161+
- run: |
162+
yarn
163+
yarn lerna bootstrap
164+
- name: Build
165+
run: yarn lerna run build-prod --scope website
166+
- uses: peaceiris/actions-gh-pages@v3
167+
with:
168+
github_token: ${{ secrets.ACCESS_TOKEN }}
169+
publish_dir: ./packages/website/public
170+
cname: www.typescript-training.com
171+

workshop/.gitignore

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
.env*
2+
# Build
3+
**/build
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Diagnostic reports (https://nodejs.org/api/report.html)
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
25+
coverage
26+
*.lcov
27+
28+
# nyc test coverage
29+
.nyc_output
30+
31+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32+
.grunt
33+
34+
# Bower dependency directory (https://bower.io/)
35+
bower_components
36+
37+
# node-waf configuration
38+
.lock-wscript
39+
40+
# Compiled binary addons (https://nodejs.org/api/addons.html)
41+
build/Release
42+
43+
# Dependency directories
44+
node_modules/
45+
jspm_packages/
46+
47+
# Snowpack dependency directory (https://snowpack.dev/)
48+
web_modules/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Optional eslint cache
57+
.eslintcache
58+
59+
# Microbundle cache
60+
.rpt2_cache/
61+
.rts2_cache_cjs/
62+
.rts2_cache_es/
63+
.rts2_cache_umd/
64+
65+
# Optional REPL history
66+
.node_repl_history
67+
68+
# Output of 'npm pack'
69+
*.tgz
70+
71+
# Yarn Integrity file
72+
.yarn-integrity
73+
74+
# dotenv environment variables file
75+
.env
76+
.env.test
77+
78+
# parcel-bundler cache (https://parceljs.org/)
79+
.cache
80+
.parcel-cache
81+
82+
# Next.js build output
83+
.next
84+
out
85+
86+
# Nuxt.js build / generate output
87+
.nuxt
88+
dist
89+
90+
# Gatsby files
91+
.cache/
92+
# Comment in the public line in if your project uses Gatsby and not Next.js
93+
# https://nextjs.org/blog/next-9-1#public-directory-support
94+
# public
95+
96+
# vuepress build output
97+
.vuepress/dist
98+
99+
# Serverless directories
100+
.serverless/
101+
102+
# FuseBox cache
103+
.fusebox/
104+
105+
# DynamoDB Local files
106+
.dynamodb/
107+
108+
# TernJS port file
109+
.tern-port
110+
111+
# Stores VSCode versions used for testing VSCode extensions
112+
.vscode-test
113+
114+
# yarn v2
115+
.yarn/cache
116+
.yarn/unplugged
117+
.yarn/build-state.yml
118+
.yarn/install-state.gz
119+
.pnp.*

workshop/.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.cache
2+
yarn.lock
3+
public

workshop/.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"endOfLine": "lf",
3+
"semi": true,
4+
"singleQuote": true,
5+
"tabWidth": 2,
6+
"useTabs": false,
7+
"trailingComma": "all",
8+
"printWidth": 60
9+
}

0 commit comments

Comments
 (0)