Skip to content

Commit 6a9d266

Browse files
committed
Reactの章の問題改訂
1 parent cceb0dd commit 6a9d266

File tree

13 files changed

+2870
-4
lines changed

13 files changed

+2870
-4
lines changed

CLAUDE.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
ut.code(); Learn is a web technology learning platform built with Docusaurus. It provides educational materials for web development, covering HTML, CSS, JavaScript, Node.js, React, and more advanced topics. The content is written in MDX format and automatically generates a documentation website.
8+
9+
## Common Commands
10+
11+
### Development
12+
13+
```bash
14+
npm ci # Install dependencies (preferred over npm install)
15+
npm start # Start development server with hot reload
16+
npm run build # Build production site
17+
npm run serve # Serve built site locally
18+
```
19+
20+
### Code Quality
21+
22+
```bash
23+
npm run format # Format code with Prettier
24+
npm run format:check # Check code formatting
25+
```
26+
27+
### Before Committing
28+
29+
Always run these commands before committing:
30+
31+
```bash
32+
npm run format
33+
npm run build
34+
```
35+
36+
## Architecture
37+
38+
### Directory Structure
39+
40+
- `docs/` - Main content directory with MDX files
41+
- `1-trial-session/` - Beginner tutorials
42+
- `2-browser-apps/` - Browser-based applications
43+
- `3-web-servers/` - Server-side development
44+
- `4-advanced/` - Advanced topics (TypeScript, React, bundlers)
45+
- `5-team-development/` - Team development practices
46+
- `_samples/` - Code examples within each section
47+
- `src/` - Docusaurus customizations
48+
- `components/` - Custom React components for MDX
49+
- `css/` - Custom styling
50+
- `pages/` - Static pages
51+
- `theme/` - Theme customizations
52+
- `static/` - Static assets (images, etc.)
53+
54+
### Content Structure
55+
56+
- All content files are `index.mdx` within their respective directories
57+
- Sidebar navigation is auto-generated based on directory structure
58+
- Each section contains practical code samples in `_samples/` subdirectories
59+
60+
### Custom Components
61+
62+
The following custom components are available for use in MDX files:
63+
64+
- `<Term>` - Add popup explanations for technical terms
65+
- `<Answer>` - Collapsible answer sections for exercises
66+
- `<ViewSource>` - Buttons to view code on GitHub and CodeSandbox
67+
- `<ExternalVideoPlayer>` - Embed external videos
68+
- `<SlideShow>` - Create image slideshows
69+
70+
### Sample Code Organization
71+
72+
Code examples are organized in `_samples/` directories within each topic:
73+
74+
- Each sample has its own `package.json` with dependencies
75+
- Samples are referenced from main content using `<ViewSource>` component
76+
- Many samples are runnable Node.js or browser applications
77+
78+
## Development Notes
79+
80+
### Content Editing
81+
82+
- Edit `index.mdx` files in the appropriate `docs/` subdirectory
83+
- Use MDX syntax (Markdown + JSX components)
84+
- Math expressions supported via KaTeX (use `$$` for block math, `$` for inline)
85+
- Mermaid diagrams supported
86+
- Code highlighting with Prism.js
87+
88+
### Node Version
89+
90+
- Requires Node.js >= 18.0 (specified in `package.json`)
91+
- Uses `.nvmrc` file for version management
92+
93+
### Formatting
94+
95+
- Uses Prettier for code formatting
96+
- VSCode configured to use Prettier as default formatter
97+
- Empty `.prettierrc.json` uses default Prettier settings
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
import { globalIgnores } from "eslint/config";
7+
8+
export default tseslint.config([
9+
globalIgnores(["dist"]),
10+
{
11+
files: ["**/*.{ts,tsx}"],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs["recommended-latest"],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
]);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="ja">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>React ToDo</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)