refac: separate front assets into esbuild bundles
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/.
This commit is contained in:
parent
ef4c7f40b0
commit
952d263b9f
1091 changed files with 295 additions and 333043 deletions
|
|
@ -7,8 +7,8 @@
|
|||
@section header {
|
||||
|
||||
<link href="~/css/main/dropzone.css" rel="stylesheet">
|
||||
|
||||
<script src="~/js/dropzone.js"></script>
|
||||
<link href="~/css/dropzone-basic.min.css" rel="stylesheet">
|
||||
<script src="~/js/dropzone.bundle.min.js" asp-append-version="true"></script>
|
||||
|
||||
@{ await Html.RenderPartialAsync("_FSScriptsPartial"); }
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
}
|
||||
|
||||
</style>
|
||||
<script src="~/js/dropzone.js"></script>
|
||||
<script src="~/js/dropzone.bundle.min.js" asp-append-version="true"></script>
|
||||
|
||||
|
||||
@{ await Html.RenderPartialAsync("_FSScriptsPartial"); }
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
}
|
||||
|
||||
@section header {
|
||||
<link rel="stylesheet" href="~/lib/jquery-timepicker/jquery.timepicker.css"></style>
|
||||
<link rel="stylesheet" href="~/css/jquery.timepicker.css" asp-append-version="true"/>
|
||||
}
|
||||
@section scripts {
|
||||
<script src="~/lib/jquery-timepicker/jquery.timepicker.min.js"></script>
|
||||
<script src="~/lib/jonthornton-Datepair/datepair.min.js"></script>
|
||||
<script src="~/js/timepicker.bundle.min.js" asp-append-version="true"></script>
|
||||
@* datepair is loaded as a static asset (not on npm) *@
|
||||
<script src="~/lib/jonthornton-Datepair/jquery.datepair.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
|
|
|||
|
|
@ -36,7 +36,5 @@
|
|||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
||||
@* jQuery + jQuery validation are loaded by core.bundle.min.js *@
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,5 @@
|
|||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
||||
@* jQuery + jQuery validation are loaded by core.bundle.min.js *@
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
@{ ViewBag.Title = "Proposition de rendez-vous ["+ViewBag.Activity.Code+"]"; }
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<script src="~/js/moment-with-locales.min.js"></script>
|
||||
<script src="~/js/datetime.bundle.min.js" asp-append-version="true"></script>
|
||||
<link rel="stylesheet" href="~/css/bootstrap-datetimepicker.min.css" asp-append-version="true"/>
|
||||
@section header {
|
||||
<style>
|
||||
#map {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<script type="text/javascript" src="~/js/moment-with-locales.min.js"></script>
|
||||
<script src="~/js/datetime.bundle.min.js" asp-append-version="true"></script>
|
||||
<link rel="stylesheet" href="~/css/bootstrap-datetimepicker.min.css" asp-append-version="true"/>
|
||||
|
||||
}
|
||||
@{ ViewBag.Title = $"Proposition de rendez-vous à {Model.PerformerProfile.Performer.UserName} [{ViewBag.Activity.Name}]"; }
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
@await Html.PartialAsync("BrusherProfileScript", Model, ViewBag.PerfPrefs)
|
||||
|
||||
@section header {
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<script src="~/js/moment-with-locales.min.js"></script>
|
||||
<script src="~/js/datetime.bundle.min.js" asp-append-version="true"></script>
|
||||
<link rel="stylesheet" href="~/css/bootstrap-datetimepicker.min.css" asp-append-version="true"/>
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
</script>
|
||||
}
|
||||
<script src="~/lib/microsoft/signalr/dist/browser/signalr.min.js" asp-append-version="true"></script>
|
||||
<script src="~/js/chat.js" asp-append-version="true"></script>
|
||||
<script src="~/js/signalr.min.js" asp-append-version="true"></script>
|
||||
<script src="~/js/chat.bundle.min.js" asp-append-version="true"></script>
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
bool multipleact = Model.Count()>1;
|
||||
}
|
||||
|
||||
@section scripts {
|
||||
@section scripts {
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var car = $('.carousel').first();
|
||||
var fi = car.children('.carousel-inner').first()
|
||||
.children('.item').first();
|
||||
var capt = fi.children('.carousel-caption-s');
|
||||
|
||||
|
||||
fi.addClass('active');
|
||||
car.animate({'background-color':'rgba(0, 0, 0, .5)'},500,function() {
|
||||
car.animate({'background-color':'rgba(0, 0, 0, 0)'},500)
|
||||
|
|
@ -25,11 +25,11 @@
|
|||
|
||||
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
|
||||
@if (multipleact) {
|
||||
|
||||
|
||||
<ol class="carousel-indicators">
|
||||
@{
|
||||
|
||||
foreach (var act in Model) {
|
||||
|
||||
foreach (var act in Model) {
|
||||
if (i==0) {
|
||||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||||
} else {
|
||||
|
|
@ -39,13 +39,13 @@
|
|||
}
|
||||
}
|
||||
</ol> }
|
||||
<div class="carousel-inner" role="listbox">
|
||||
<div class="carousel-inner" role="listbox">
|
||||
@{
|
||||
string cls = "item";
|
||||
i=0;
|
||||
foreach (var act in Model) {
|
||||
foreach (var act in Model) {
|
||||
<div class="@cls" style="background-image: url('@act.Photo'); background-repeat: no-repeat; ">
|
||||
|
||||
|
||||
<div class="carousel-caption-s" >
|
||||
<p><em>@act.Name</em><br/>
|
||||
@act.Description </p>
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
@if (act.Children.Count>0) {
|
||||
<a asp-route-id="@act.Code" class="btn btn-light">
|
||||
@foreach (Activity c in act.Children) {
|
||||
@Html.DisplayFor(subact=>c)
|
||||
@Html.DisplayFor(subact=>c)
|
||||
}
|
||||
</a>
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
|
|
@ -82,7 +82,6 @@
|
|||
}
|
||||
}
|
||||
@section header {
|
||||
<script src="~/lib/bootstrap/js/carousel.js" asp-append-version="true"></script>
|
||||
<style>
|
||||
.navbar {
|
||||
margin-bottom: 0;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,5 @@
|
|||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script src="~/lib/jquery-validation/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
||||
@* jQuery + jQuery validation are loaded by core.bundle.min.js *@
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,5 @@
|
|||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script src="~/lib/jquery-validation/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
||||
@* jQuery + jQuery validation are loaded by core.bundle.min.js *@
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,9 @@
|
|||
background-color: grey;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="~/lib/dropzone/basic.min.css" />
|
||||
<link rel="stylesheet" href="~/lib/dropzone/dropzone.min.css" />
|
||||
<script src="~/lib/dropzone/dropzone.min.js"> </script>
|
||||
<script src="~/lib/dropzone/dropzone-amd-module.min.js"> </script>
|
||||
<link rel="stylesheet" href="~/css/dropzone-basic.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/dropzone.min.css" asp-append-version="true"/>
|
||||
<script src="~/js/dropzone.bundle.min.js" asp-append-version="true"></script>
|
||||
}
|
||||
|
||||
@section scripts{
|
||||
|
|
|
|||
|
|
@ -7,13 +7,10 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||
<link rel="icon" type="image/svg+xml" href="~/images/yavsc-logo.svg" asp-append-version="true" />
|
||||
<link rel="alternate icon" type="image/x-icon" href="@SiteSettings.Value.FavIcon" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/lib/jquery-ui/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="~/lib/bootstrap.quartz.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
|
||||
<script src="~/lib/jquery-ui/external/jquery/jquery.js"></script>
|
||||
<script src="~/lib/jquery-ui/jquery-ui.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
<link rel="stylesheet" href="~/css/bootstrap.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/jquery-ui.min.css" asp-append-version="true"/>
|
||||
<script src="~/js/core.bundle.min.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("header", false)
|
||||
</head>
|
||||
<body style="background-image: url('@Config.SiteSetup.Banner');
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
||||
// Validation scripts are now bundled into core.bundle.min.js (jQuery
|
||||
// validate + jquery.validate.unobtrusive). This partial is kept as a
|
||||
// no-op so existing views that reference it continue to work; new
|
||||
// views do not need to include it.
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
<environment names="Development">
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
</environment>
|
||||
<environment names="yavsc,yavscpre,zicmoove,lua,coiffure">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation/jquery.validate.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive">
|
||||
</script>
|
||||
</environment>
|
||||
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
||||
<script src="~/js/input-lib.js"></script>
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
ViewBag.Title = "Page d'accueil";
|
||||
}
|
||||
@section header {
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<script src="~/js/moment-with-locales.min.js"></script>
|
||||
<script src="~/js/datetime.bundle.min.js" asp-append-version="true"></script>
|
||||
<link rel="stylesheet" href="~/css/bootstrap-datetimepicker.min.css" asp-append-version="true"/>
|
||||
}
|
||||
<h2>@ViewBag.Title</h2>
|
||||
<form asp-action="Create" id="FrmComCre" role="form">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue