Skip to content

Commit 0a981fe

Browse files
committed
feat: 实现 CodePanel 组件的代码行高亮和变量显示功能
- 创建 codeSnippets.ts 数据文件,包含 Java/Python/Go/JavaScript 四种语言的 MinStack 实现代码 - 实现 CodePanel.css 样式文件,包含 VS Code Dark+ 风格的语法高亮主题 - 实现代码行高亮功能,当前执行的代码行显示黄色背景 - 实现变量状态面板,在代码面板底部显示当前步骤的变量值 - 更新 stepGenerator.ts 中的代码行映射,与实际代码行号对应 - 创建完整的 App.tsx 集成所有组件 - 修复类型导入问题(使用 type-only imports) Requirements: 5.7, 5.8, 5.9, 5.10
1 parent d455695 commit 0a981fe

Some content is hidden

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

45 files changed

+8832
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: 'pages'
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v4
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: './dist'
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp
4+
.pnp.js
5+
6+
# Build outputs
7+
dist/
8+
build/
9+
*.local
10+
11+
# IDE
12+
.idea/
13+
.vscode/
14+
*.swp
15+
*.swo
16+
*~
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db
21+
22+
# Logs
23+
logs/
24+
*.log
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
pnpm-debug.log*
29+
30+
# Environment
31+
.env
32+
.env.local
33+
.env.development.local
34+
.env.test.local
35+
.env.production.local
36+
37+
# Testing
38+
coverage/
39+
40+
# Cache
41+
.cache/
42+
.eslintcache

0 commit comments

Comments
 (0)