mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
ead911e214
Bumps supported Node engines to `^22.22.3 || ^24.15.0`. Updates to Node 22.22.3 for development, production, GitHub workflows and in documentation.
46 lines
920 B
Markdown
46 lines
920 B
Markdown
# Frontend
|
|
|
|
## Directory Structure
|
|
|
|
- `./src/` - Frontend code
|
|
- `./src/app/` - Legacy Angular modules/components
|
|
- `./src/stimulus/` - Stimulus controllers
|
|
- `./src/turbo/` - Turbo integration
|
|
|
|
## Configuration Files
|
|
|
|
- `eslint.config.mjs` - JavaScript/TypeScript linting
|
|
- `../package.json` / `./frontend/package.json` - Node.js dependencies
|
|
|
|
## Version Requirements
|
|
|
|
- Node: `^22.22.3 || ^24.15.0` (see `package.json` engines)
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
npm ci && cd .. # Install Node packages
|
|
```
|
|
|
|
## Code Style
|
|
|
|
### JavaScript/TypeScript
|
|
- **New development**: Use Hotwire (Turbo + Stimulus) with server-rendered HTML
|
|
- **Legacy code**: Follow ESLint rules
|
|
- Prefer TypeScript over JavaScript
|
|
- Use [Primer Design System](https://primer.style/product/) via ViewComponent
|
|
|
|
## Linting
|
|
|
|
```bash
|
|
# JavaScript/TypeScript
|
|
npx eslint src/ && cd ..
|
|
```
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
# Frontend (Jasmine/Karma)
|
|
npm test && cd ..
|
|
```
|