chat.bundle.min.js no longer bundles jQuery, jQuery UI,
jquery-validation, jquery-validation-unobtrusive, showdown,
or to-markdown. The application code (chat.js, comment.js)
consumes them from window.$ / window.jQuery (provided by the
layout's global scripts) or does not need them at all.
Bundle size: 591 KB → 7.6 KB.
NOTE: This commit does not touch any versioned file. The
build/ directory and the .min.js outputs under
wwwroot/js/ are gitignored. The bundle is regenerated by
'npm run build:js' (see INSTALL.md and the script 'build:js'
in package.json).
Build state is partially migrated: only chat is clean so far.
Other bundles (core, dropzone, datetime, timepicker) still
bundle jQuery — upcoming commits will clean them up too.
Redundancy is harmless (the second jQuery load is a no-op
override) but wasteful; full cleanup is the goal of this
refac.
Tested: dotnet test 11/11 green.
JQuery, jQuery UI, Bootstrap, jquery-validation and
jquery-validation-unobtrusive are now loaded as separate
<script> tags by _Layout.cshtml, BEFORE the core bundle.
Why: esbuild IIFE bundles do not expose jQuery ($ and jQuery)
on window — UMD-style modules bundled in IIFE format are wrapped
in a closure. The application code (site.js, md-helpers.js,
yavsc-remote-fs.js, etc.) consumes window.$ / window.jQuery, so
it broke at runtime. Loading these scripts as global <script> tags
restores the expected global exposure.
This commit only touches the layout. Future commits will remove
the corresponding imports from each bundle's entry (chat, dropzone,
datetime, timepicker) and let them rely on window.$ being already
defined by the layout.
Tested: dotnet test 11/11 green. The new global scripts are
served by ASP.NET static files (HTTP 200 verified). Server
restart by developer required to pick up the new layout.
Removing the 'bootstrap' and 'popper.js' NuGet package references
that were used solely to copy assets to wwwroot/ at build time.
The npm-based esbuild bundles now provide the same files, and the
duplicate-asset build error is gone.
'bootstrap 5.3.8' (NuGet) was flagged with vulnerabilities by
Dependabot. Pinning to 4.6.2 via npm (matching what the views
were using from wwwroot/lib/) is closer to what the rest of the
codebase expects.
Verified: 'dotnet test' passes (11/11).
Refs: this is the fix to make the 'separate front assets into
esbuild bundles' commit green.
Add ignore rules for the new front-end toolchain:
- node_modules/ : npm install output
- build/ : esbuild entry files (regenerated by build:js)
- package-lock.json : not committed (use package.json as canonical)
- src/Yavsc.Org/wwwroot/lib/ : vendor libs (replaced by bundles)
with exception for jonthornton-Datepair/ (not on npm)
- src/Yavsc.Org/wwwroot/js/*.min.js : generated by esbuild
The esbuild bundles under wwwroot/js and wwwroot/css are now
produced by 'npm run build:js'. Document this in INSTALL.md so
new contributors know to run 'npm install' before 'make install'.
Sort ~50 Mo de libs tierces hors du repo et regroupe le code
front en 6 bundles thématiques + 2 assets statiques.
Bundles produits par esbuild :
- core.bundle.min.js : jQuery + jQuery UI + Bootstrap 4 + validation
+ tout le code applicatif 'core'
(site, signout, signin, input-lib, md-helpers,
audiovideoinput, parallax, google.geocode,
google-geoloc). Chargé par _Layout.cshtml.
- chat.bundle.min.js : core subset (sans Bootstrap) + chat.js + comment.js
(SignalR client chargé séparément, voir plus bas)
- dropzone.bundle.min.js : jQuery + dropzone + yavsc-remote-fs
- datetime.bundle.min.js : jQuery + jQuery UI + eonasdan datetimepicker
+ jquery-timepicker
- timepicker.bundle.min.js : jQuery + jQuery UI + jquery-timepicker
- quill.bundle.min.js : Quill rich text editor
Assets statiques (non bundlés, copiés depuis node_modules) :
- signalr.min.js : client SignalR 2.x (legacy server)
- moment-with-locales.min.js : moment + 137 locales (require dynamique
non résolvable statiquement par esbuild)
CSS vendor copiées comme assets statiques vers wwwroot/css/ :
bootstrap.min.css, jquery-ui.min.css, dropzone.min.css,
dropzone-basic.min.css, bootstrap-datetimepicker.min.css,
jquery.timepicker.css
Exception gitignore : jonthornton-Datepair/jquery.datepair.min.js
n'est pas sur npm, conservé comme asset statique sous
wwwroot/lib/jonthornton-Datepair/ (téléchargé depuis upstream).
Vues Razor mises à jour (15 fichiers) pour pointer vers les bundles
et les CSS vendor. Suppression de la majorité de wwwroot/lib/ (1300+
fichiers). Suppression des jquery*.js, quill.js, showdown.js,
to-markdown.js, jquery.signalR-2.2.1.js, dropzone.js et de leurs
.min.js associés.
'jquery-datepair' et 'jquery-ui-map' non publiés sur npm :
- jquery-ui-map n'est utilisé nulle part dans le repo (vérifié),
la dépendance est purement historique.
- datepair reste en static sous wwwroot/lib/jonthornton-Datepair/.
Pose les fondations du bundle front unique :
- package.json : deps npm (jQuery, jQuery UI, jQuery plugins,
Bootstrap 5, SignalR, Moment, Quill, Showdown, To-markdown,
Dropzone, eonasdan-datetimepicker) + esbuild.
- esbuild.config.mjs : produit src/Yavsc.Org/wwwroot/js/site.bundle.min.js
à partir des .js à nous + des libs npm.
- .gitignore : exclut node_modules/, wwwroot/lib/, et les *.min.js
sous wwwroot/js (générés au build, non versionnés).
Le bundle généré sera commité au commit suivant pour que le
runtime .NET n'ait pas besoin de node au publish time.
TODO.fr.md (2016-2017) archivé en TODO.fr.md.archive.
ROADMAP.md reformule les jalons en s'appuyant sur l'Architecture
et la session DDD du 14 juin 2026.
doc/Architecture.md: section 'Droits de yavsc' ajoutée (admin, groupes, user yavsc).
doc/ddd-exploration-2026-06-14.md: première session d'Event Storming narratif.