2017f9791b
- Remove `zen-setup` binary from package.json and package-lock.json - Replace manual setup steps with `npx @zen/start` CLI command - Simplify INSTALL.md by reducing steps from 6 to 4 - Update DEV.md to reflect removal of zen-setup from CLI scripts - Fix relative path to `.env.example` in documentation
2.5 KiB
2.5 KiB
DEV
Standards
On suit ces deux guides :
- GUIDE.md : conventions générales de rédaction et de structure
- REDACTION.md : règles de style, ton et formatage
Structure du projet
src/
├── cli/ # Scripts CLI : zen-db
├── core/ # Briques techniques : database, api, email, storage, cron, pdf, toast, payments
├── features/ # Features utilisateur : auth, admin, provider
├── modules/ # Modules métier : posts, invoice, nuage…
└── shared/ # Composants, lib et styles partagés
Publier le package
Le package @zen/core est publié sur le registre npm à https://git.hyko.cx.
1. Configurer l'authentification
Créer un token d'accès dans Gitea (Settings → Applications → Generate Token), puis l'enregistrer localement :
npm config set //git.hyko.cx/api/packages/zen/npm/:_authToken TOKEN
Remplacer TOKEN par le token généré.
2. Build et publish
npm publish
Le script prepublishOnly lance automatiquement le build avant la publication.
Intégrer une Pull Request GitHub
Le dépôt GitHub est un miroir en lecture seule. On intègre manuellement les PRs de la communauté depuis Gitea.
1. Récupérer la branche du contributeur
git fetch https://github.com/<contributeur>/core <branche>
Par exemple :
git fetch https://github.com/jdupont/core fix/auth-token-expiry
2. Inspecter les changements
git log FETCH_HEAD --oneline
git diff main...FETCH_HEAD
3a. Appliquer avec cherry-pick (recommandé pour un ou quelques commits)
git cherry-pick <hash-du-commit>
Pour plusieurs commits consécutifs :
git cherry-pick <hash-début>^..<hash-fin>
3b. Appliquer avec merge (pour une branche entière)
git checkout -b integration/<description>
git merge FETCH_HEAD
# résoudre les conflits si nécessaire
git checkout main
git merge integration/<description>
git branch -d integration/<description>
4. Pousser vers Gitea
git push origin main
Le miroir GitHub se met à jour automatiquement. Fermer ensuite la PR sur GitHub en indiquant le hash du commit en commentaire.
Bump de version
Modifier "version" dans package.json en suivant semver :
| Type | Version |
|---|---|
fix |
PATCH 1.x.X |
feat |
MINOR 1.X.0 |
| Breaking change | MAJOR X.0.0 |