From f49eae6c3141d55e67c5459ee0658d4331a2cfe0 Mon Sep 17 00:00:00 2001 From: GnomeZworc Date: Sun, 7 Jun 2026 13:08:50 +0200 Subject: [PATCH] =?UTF-8?q?rename=20components.yml=20=E2=86=92=20config.ym?= =?UTF-8?q?l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The manifest covers components, pages, vendors and menu — config.yml is a more accurate name. Updated build.sh (both project and template), router.js comment, and README. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: GnomeZworc --- README.md | 8 ++++---- build.sh | 6 +++--- components.yml => config.yml | 0 sources/core/router.js | 2 +- template/build.sh | 6 +++--- template/{components.yml => config.yml} | 0 6 files changed, 11 insertions(+), 11 deletions(-) rename components.yml => config.yml (100%) rename template/{components.yml => config.yml} (100%) diff --git a/README.md b/README.md index a38eff7..1fb1113 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Syn Framework web minimaliste basé sur JavaScript vanilla et les Web Components. -Routage hash-based, composants déclarés dans `components.yml`, build via `build.sh`. +Routage hash-based, composants déclarés dans `config.yml`, build via `build.sh`. ## Structure d'un projet @@ -15,7 +15,7 @@ Routage hash-based, composants déclarés dans `components.yml`, build via `buil │ ├── vendor/ # Libs tierces (gitignored) │ └── pages/ │ └── / # Une page = un dossier -├── components.yml # Source de vérité +├── config.yml # Source de vérité └── build.sh # Télécharge les remotes + génère les JSON ``` @@ -35,13 +35,13 @@ python3 -m http.server 8000 --directory sources/ - `index.html` — fragment HTML (ex. ``) - `.js` — `customElements.define` + `export function init(main) {}` - `.css` — styles scopés à la page (optionnel) -2. Déclarer sous `local_pages:` dans `components.yml` +2. Déclarer sous `local_pages:` dans `config.yml` 3. Ajouter la route à `menu:` si visible dans la nav 4. `./build.sh` ## Ajouter un composant -1. Déclarer sous `components:` dans `components.yml` : +1. Déclarer sous `components:` dans `config.yml` : ```yaml components: - name: mon-composant diff --git a/build.sh b/build.sh index aa754dc..a25ce23 100755 --- a/build.sh +++ b/build.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Build the web UI component set from components.yml. +# Build the web UI component set from config.yml. # # ./build.sh build (download remote components + generate components.json) # ./build.sh --check validate manifest and entry files without downloading # -# Reads components.yml, downloads each remote component into components// +# Reads config.yml, downloads each remote component into components// # at the requested ref, then generates components.json (runtime load list) and # components.lock.json (resolved commit pins). # @@ -16,7 +16,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" WEB_DIR="${SCRIPT_DIR}/sources" -MANIFEST="${SCRIPT_DIR}/components.yml" +MANIFEST="${SCRIPT_DIR}/config.yml" COMPONENTS_DIR="${WEB_DIR}/components" OUTPUT="${WEB_DIR}/components.json" LOCKFILE="${WEB_DIR}/components.lock.json" diff --git a/components.yml b/config.yml similarity index 100% rename from components.yml rename to config.yml diff --git a/sources/core/router.js b/sources/core/router.js index d23777c..7f9920f 100644 --- a/sources/core/router.js +++ b/sources/core/router.js @@ -1,5 +1,5 @@ // Hash-based SPA router. -// Reads pages.json (generated by build.sh from components.yml). +// Reads pages.json (generated by build.sh from config.yml). // Each page is an HTML fragment (index.html) + optional CSS + optional JS module. // // Load order enforced by index.html: diff --git a/template/build.sh b/template/build.sh index aa754dc..a25ce23 100755 --- a/template/build.sh +++ b/template/build.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Build the web UI component set from components.yml. +# Build the web UI component set from config.yml. # # ./build.sh build (download remote components + generate components.json) # ./build.sh --check validate manifest and entry files without downloading # -# Reads components.yml, downloads each remote component into components// +# Reads config.yml, downloads each remote component into components// # at the requested ref, then generates components.json (runtime load list) and # components.lock.json (resolved commit pins). # @@ -16,7 +16,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" WEB_DIR="${SCRIPT_DIR}/sources" -MANIFEST="${SCRIPT_DIR}/components.yml" +MANIFEST="${SCRIPT_DIR}/config.yml" COMPONENTS_DIR="${WEB_DIR}/components" OUTPUT="${WEB_DIR}/components.json" LOCKFILE="${WEB_DIR}/components.lock.json" diff --git a/template/components.yml b/template/config.yml similarity index 100% rename from template/components.yml rename to template/config.yml