Skip to content

Commit 8017fff

Browse files
authored
Merge branch 'code-differently:main' into lesson_17
2 parents 68ff344 + ad5d3b8 commit 8017fff

File tree

155 files changed

+19346
-4
lines changed

Some content is hidden

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

155 files changed

+19346
-4
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Lesson 26 Java Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
paths:
7+
- "lesson_26/api/java/**"
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up JDK
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '21'
24+
distribution: 'temurin'
25+
26+
- name: Build Lesson 26 with Java
27+
working-directory: ./lesson_26/api/java
28+
run: ./gradlew check
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Lesson 26 TS Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
paths:
7+
- "lesson_26/api/javascript/api_app/**"
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20.x'
23+
24+
- name: Build Lesson 26 with Node.js
25+
working-directory: ./lesson_26/api/javascript/api_app
26+
run: |
27+
npm ci
28+
npm run check

.github/workflows/check_push.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,13 @@ jobs:
164164
working-directory: ./lesson_17/bank
165165
run: ./gradlew check
166166

167+
- name: Build Lesson 26 with Java
168+
working-directory: ./lesson_26/api/java
169+
run: ./gradlew assemble
170+
171+
- name: Build Lesson 26 with Node.js
172+
working-directory: ./lesson_26/api/javascript/api_app
173+
run: |
174+
npm ci
175+
npm run build
176+

lesson_25/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,26 @@ Please review the following resources before lecture:
1515

1616
## Homework
1717

18-
- TODO(anthonydmays): Assign some homework
18+
- [ ] Complete the [Introduction to React](#introduction-to-react) exercise.
19+
- [ ] Do pre-work for [lesson 26](/lesson_26/).
20+
21+
### Introduction to React
22+
This exercise will give you hands-on experience with the React framework and supporting tools to enhance a dynamic front-end application that communicates with a backend API.
23+
24+
#### Starting the servers
25+
26+
1. Copy the React [template](./template/) folder to your own unique folder. Make necessary code changes in your folder only.
27+
2. Install the React web server in your copy using `npm install` and then run it using the `npm run dev` command.
28+
29+
#### Create new components
30+
3. Modify the [Home](./template/src/pages/Home/Home.tsx) component to create new `Program` and `ProgramList` components. The needed HTML and CSS has already been provided for you.
31+
- The `Program` component should allow you to configure the title and description to display.
32+
33+
#### Create a page for adding new programs
34+
35+
4. Create a new page (similar to the Home page component) that allows users to provide a new program title and description in a form.
36+
37+
> [!NOTE]
38+
> You can use the [React Router tutorial](https://reactrouter.com/en/main/start/tutorial#updating-contacts-with-formdata) to learn how to handle form submissions.
39+
40+
[react-router-link]: https://reactrouter.com/en/main/start/tutorial

lesson_25/template/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

lesson_25/template/.prettierrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"bracketSpacing": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"arrowParens": "avoid",
6+
"importOrder": [
7+
"<THIRD_PARTY_MODULES>",
8+
"interface",
9+
"(?=content|api)",
10+
"context/",
11+
"mock/",
12+
"config",
13+
"utils/",
14+
"hooks/",
15+
"(components/|./index)",
16+
".svg",
17+
"^../(.*)$",
18+
"(?=./styles.module.scss)"
19+
],
20+
"endOfLine": "auto",
21+
"importOrderSeparation": true,
22+
"importOrderSortSpecifiers": true,
23+
"plugins": ["@trivago/prettier-plugin-sort-imports"]
24+
}

lesson_25/template/eslint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// .eslintrc.js
2+
import eslintConfigPrettier from 'eslint-config-prettier';
3+
4+
export default [eslintConfigPrettier];

lesson_25/template/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Code Different - Cohort 24Q1</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)