diff --git a/README.md b/README.md index 1b34615..2f58971 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o jean-linux-amd64 ./cmd/jean - `cmd/jean/` — point d'entrée (`main()`) + ressources Windows (.syso, icône, versioninfo). - `internal/jean/` — tout le code, fichiers préfixés par domaine (`web_*`, `chat_*`, `llm_*`, `backend_*`, `relay_*`, `sys_*` — carte dans `doc.go`). -- `internal/jean/ui/` — UI web embarquée. `index.html` est **généré** : les sources vivent dans `ui/src/` (`styles.css`, `js/NN-*.js` concaténés dans l'ordre alphabétique, `index.tmpl.html`). Pour modifier l'UI : éditer `ui/src/` puis lancer `ui/assemble.ps1` (le fichier assemblé reste committé car `go:embed` et `ajean-app/build-server-ui.ps1` le lisent tel quel). +- `internal/jean/ui/` — UI web embarquée. `index.html` est **généré** : les sources vivent dans `ui/src/` (`styles.css`, `js/NN-*.js` concaténés dans l'ordre alphabétique, `index.tmpl.html`). Pour modifier l'UI : éditer `ui/src/` puis lancer `go generate ./internal/jean` (outil `tools/assemble-ui`, multiplateforme ; le fichier assemblé reste committé car `go:embed` et `ajean-app/build-server-ui.ps1` le lisent tel quel). ## Licence diff --git a/internal/jean/ui/assemble.ps1 b/internal/jean/ui/assemble.ps1 deleted file mode 100644 index fdeb0d8..0000000 --- a/internal/jean/ui/assemble.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -# assemble.ps1 — reconstruit ui/index.html à partir des sources ui/src/. -# -# ui/index.html est un fichier GÉNÉRÉ (mais committé : go:embed et -# ajean-app/build-server-ui.ps1 le lisent tel quel). Pour modifier l'UI : -# éditer ui/src/ (styles.css, js/NN-*.js, index.tmpl.html) puis relancer ce -# script. Les js/ sont concaténés dans l'ordre alphabétique (préfixes NN-), -# tout reste en scope global comme avant le découpage. -# -# Tout est manipulé en octets bruts (fins de ligne/encodage préservés). - -$ErrorActionPreference = 'Stop' -$here = Split-Path -Parent $MyInvocation.MyCommand.Path -$src = Join-Path $here 'src' -$dst = Join-Path $here 'index.html' - -$tmpl = [IO.File]::ReadAllText((Join-Path $src 'index.tmpl.html')) -$css = [IO.File]::ReadAllText((Join-Path $src 'styles.css')) -$js = (Get-ChildItem (Join-Path $src 'js') -Filter '*.js' | Sort-Object Name | - ForEach-Object { [IO.File]::ReadAllText($_.FullName) }) -join '' - -# le marqueur et SA fin de ligne sont remplacés (LF ou CRLF selon le checkout) ; -# chaque source apporte ses propres fins de ligne → sortie byte-stable. -foreach ($m in '@@CSS@@', '@@JS@@') { - if ($tmpl -notmatch "$m`r?`n") { throw "marqueur $m introuvable dans index.tmpl.html" } -} -$html = [regex]::Replace($tmpl, "@@CSS@@`r?`n", { $css }) -$html = [regex]::Replace($html, "@@JS@@`r?`n", { $js }) - -[IO.File]::WriteAllText($dst, $html, [Text.UTF8Encoding]::new($false)) -Write-Host "OK -> $dst ($([IO.File]::ReadAllBytes($dst).Length) octets)" diff --git a/internal/jean/ui/index.html b/internal/jean/ui/index.html index bd741ea..b36bb6a 100644 --- a/internal/jean/ui/index.html +++ b/internal/jean/ui/index.html @@ -1,5 +1,5 @@ - + +