Il progetto usa semantic-release nel workflow .github/workflows/docker-build-push.yml su push verso main/master (o workflow_dispatch).
Non devi creare tag manuali: i tag Git vengono creati automaticamente nel formato vX.Y.Z.
Regole Conventional Commits usate per il version bump:
fix:-> patchfeat:-> minorBREAKING CHANGEo!-> major
Quando esce una nuova release:
semantic-releasecalcola la nuova versione.- Aggiorna
CHANGELOG.md,package.jsonepackage-lock.json(commit di release automatico). - Crea release GitHub.
- Solo in questo caso builda e pubblica l'immagine Docker su GHCR.
Allineamento versione app/immagine:
- il workflow valida che
package.json.versionsia uguale alla versione release; - i tag Docker pubblicati sono
${version},v${version}elatest.
Registry immagine:
ghcr.io/<owner>/<repo>(sempre lowercase)- esempio:
ghcr.io/davidemaggidev/davidemaggidev
Per evitare errori npm ci in GitHub Actions, il repository e' fissato a npm@10.9.4 (vedi package.json e workflow).
Quando aggiorni dipendenze o lockfile, usa npm 10.9.4.
Inoltre e' presente un check dedicato (.github/workflows/ci-lockfile.yml) che valida npm ci su ogni push e pull request.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
- Avvia Vite in LAN:
npm run dev:lan- Trova l'IP locale del tuo computer (es.
192.168.1.24). - Dal telefono/tablet collegato alla stessa rete apri:
http://<IP_LOCALE>:5173
Note rapide:
- PC e dispositivo devono essere sulla stessa rete Wi-Fi/LAN.
- Se non si apre, controlla firewall/VPN o isolamento client del router.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])