Skip to content

refactor/vite #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
- name: checkout
uses: actions/checkout@v3

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 24.x
uses: actions/setup-node@v3
with:
node-version: 24.x

- name: Build & deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REACT_APP_NAME: ${{ secrets.REACT_APP_VERSION }}
SENTRY_ENVIRONMENT: ${{ secrets.SENTRY_ENVIRONMENT}}
REACT_APP_VERSION: ${{ secrets.REACT_APP_VERSION }}
REACT_APP_MAP_API_KEY: ${{ secrets.REACT_APP_MAP_API_KEY }}
REACT_APP_GOOGLE_ANALYTICS_API_KEY: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_API_KEY}}
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm i
npm run build
npx gh-pages --branch gh-pages --dist build -u "github-actions-bot <[email protected]>"
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Build & deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REACT_APP_NAME: ${{ secrets.REACT_APP_VERSION }}
SENTRY_ENVIRONMENT: ${{ secrets.SENTRY_ENVIRONMENT}}
REACT_APP_VERSION: ${{ secrets.REACT_APP_VERSION }}
REACT_APP_MAP_API_KEY: ${{ secrets.REACT_APP_MAP_API_KEY }}
REACT_APP_GOOGLE_ANALYTICS_API_KEY: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_API_KEY}}
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm i
npm run build
npx gh-pages --branch gh-pages --dist build -u "github-actions-bot <[email protected]>"
10 changes: 5 additions & 5 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ "main" ]
pull_request:
types: [opened, synchronize, reopened]
types: [ opened, synchronize, reopened ]

jobs:
sonarcloud:
Expand All @@ -30,17 +30,17 @@ jobs:
${{ runner.os }}-

# Run tests with coverage
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x

- name: run tests with coverage
run: |
npm ci
npm run test -- --coverage . --watchAll=false
npm run test-coverage

# Send report to sonar
# Send report to sonar
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [ 22.x ]

steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Tests
run: |
npm ci
npm run test
- name: Tests
run: |
npm ci
npm run test
42 changes: 21 additions & 21 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:

strategy:
matrix:
node-version: [19.x, 20.x, 22.x]
node-version: [ 20.x, 22.x, 24.x ]

steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Build
run: |
npm ci
npm run build
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm ci
npm run build
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,27 @@ The project follows a standard React application structure:
- `2024/`: Components specific to the 2024 conference edition
- `2023/`: Components specific to the 2023 conference edition

## Path Aliases

This project uses path aliases to simplify imports. Instead of using relative
paths like `../../components/Button`, you can use aliases like
`@components/Button`.

Available aliases:

- `@components/*` - Components from `src/components/`
- `@constants/*` - Constants from `src/constants/`
- `@services/*` - Services from `src/services/`
- `@hooks/*` - Hooks from `src/hooks/`
- `@assets/*` - Assets from `src/assets/`
- `@styles/*` - Styles from `src/styles/`
- `@views/*` - Views from `src/views/`
- `@utils/*` - Utilities from `src/utils/`
- `@data/*` - Data from `src/data/`
- `@types/*` - Types from `src/types/`

For more details, see the [Path Aliases Documentation](docs/path-aliases.md).

## Development Workflow

### Getting Started
Expand All @@ -50,21 +71,23 @@ The project follows a standard React application structure:
- `npm run test-coverage`: Run tests with coverage reporting
- `npm run build`: Build for production
- `npm run deploy`: Deploy to GitHub Pages
- `npm run eject`: Eject from Create React App (not recommended)
- `npm run lint`: Run ESLint to check for code quality issues
- `npm run lint:fix`: Run ESLint and automatically fix fixable issues

## Contribution Guidelines

When contributing to this project, please:

1. Follow the existing code style and patterns
2. Write tests for new features
3. Ensure all tests pass before submitting pull requests
4. Keep the UI consistent with the existing design
5. Document any new components or significant changes
2. Run ESLint (`npm run lint`) to ensure code quality and fix any issues
3. Write tests for new features
4. Ensure all tests pass before submitting pull requests
5. Keep the UI consistent with the existing design
6. Document any new components or significant changes

## Contact

For questions or issues related to the DevBcn website, please open an issue in
this repository.

Visit the live site at [https://www.devbcn.com](https://www.devbcn.com)
Visit the live site at [https://www.devbcn.com](https://www.devbcn.com)
Loading
Loading