winzik/docs/ide/fr/scripts.md
David Nurdin 7de153fc14 IDE documentation: one page per feature (docs/ide/, French in docs/ide/fr/) and a Doc browser inside the IDE
- docs/ide/: 49 user pages grouped in toc.json (editing, languages, run / test / debug, Git, web sites and Symfony, databases,
  Docker and SSH, games, AI, team, settings); pages of features still being built are "coming soon" stubs with a TODO list;
  15 pages translated into French; docs/ide.md and docs/ide.fr.md link to them.
- The Doc button at the top right of the IDE, Help > Documentation, Search Everywhere "Documentation" and a "?" in each tool
  window's header open the Doc browser (ide/ui/js/docs-browser.js): table of contents, rendered pages (pictures, code, tables,
  links between pages and to headings), full-text search, back / forward, the IDE's language with English as the fallback.
- ide/src/Docs/DocsLibrary.php (docs.index, docs.image): reads only the documentation folder (strict names, real path checked);
  the packaged copy ui/docs first, else the repository's docs/ide.
- Packaging: tools/stage-game.sh copies docs/ide into the exported IDE (its *.md exclusion would drop them), overlay-build.php
  puts them in code updates, bin/jumphp ide syncs them.
- Tests: docs-model.test.mjs (TOC, links, anchors, pictures, search; every page and picture of docs/ide exists), DocsLibraryTest
  (path traversal refused), the i18n test covers the new texts in 14 languages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JkYTqsvYu6AYr9yQ3Q4Nt6
2026-11-16 00:08:42 +01:00

32 lines
1.6 KiB
Markdown

# Scripts
La fenêtre **Scripts** (à droite, l'éclair) liste les scripts du projet et les tâches qu'il a déjà.
![La fenêtre Scripts](../images/scripts.png)
## Vos scripts
**+ Script** : un nom, une icône, un corps shell (plusieurs lignes), où il tourne (un onglet **Terminal**, la fenêtre **Run**, ou **en
arrière-plan** avec une notification), un dossier, des variables d'environnement, **Demander avant de lancer**, et pour les sites web
**Lancer dans le conteneur PHP du site**.
Variables : `${file}`, `${dir}`, `${project}`, `${selection}`, `${line}`, `${fileName}`, `${relativeFile}`, `${input:Libellé}`
(demandé à chaque lancement), toujours passées entre guillemets sûrs.
Gardés dans `.jumphp/scripts.json` (partagé par l'équipe), ou avec **Sur cet ordinateur seulement** dans `.jumphp/scripts.local.json`.
## Tâches trouvées dans le projet
Cibles Makefile, tâches Castor, scripts de `composer.json` et `package.json`, recettes justfile, tâches Taskfile. Clic droit : lancer,
**En faire un script…**. Un `castor.php` sans castor propose **Installer Castor…** ; **Nouvelle tâche Castor…** l'écrit dans
`castor.php`.
## Les rendre pratiques
L'étoile épingle un script à la barre d'outils ; **Raccourci, icône et événements…** : un raccourci clavier, lancer à
l'enregistrement de certains fichiers, à l'ouverture du projet ou **avant** des configurations de lancement.
## Confiance
Les scripts ne se lancent jamais seuls tant que vous n'avez pas fait confiance au projet (le bandeau, ou ⋯ > Faire confiance). Un clic
lance toujours.