Asset-bundle cleanups (#4225)

Some cleanups in addition to #4222.
This commit is contained in:
d11n 2022-10-21 02:17:06 +02:00 committed by GitHub
parent 54c9d7283a
commit 0fd47eeee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 3 additions and 37 deletions

4
.gitignore vendored
View File

@ -288,10 +288,6 @@ __pycache__/
*.xsd.cs
/BTCPayServer/Build/dockerfiles
# Bundling JS/CSS
BTCPayServer/wwwroot/bundles/*
!BTCPayServer/wwwroot/bundles/.gitignore
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json

View File

@ -65,11 +65,7 @@ namespace BTCPayServer.Configuration
if (conf.GetOrDefault<bool>("launchsettings", false) && NetworkType != ChainName.Regtest)
throw new ConfigException($"You need to run BTCPayServer with the run.sh or run.ps1 script");
BundleJsCss = conf.GetOrDefault<bool>("bundlejscss", true);
DockerDeployment = conf.GetOrDefault<bool>("dockerdeployment", true);
TorrcFile = conf.GetOrDefault<string>("torrcfile", null);
TorServices = conf.GetOrDefault<string>("torservices", null)
?.Split(new[] { ';', ',' }, StringSplitOptions.RemoveEmptyEntries);
@ -192,16 +188,7 @@ namespace BTCPayServer.Configuration
public string RootPath { get; set; }
public bool DockerDeployment { get; set; }
public bool BundleJsCss
{
get;
set;
}
public SSHSettings SSHSettings
{
get;
set;
}
public SSHSettings SSHSettings { get; set; }
public string TorrcFile { get; set; }
public string[] TorServices { get; set; }
public Uri UpdateUrl { get; set; }

View File

@ -31,7 +31,6 @@ namespace BTCPayServer.Configuration
app.Option("--nocsp", $"Disable CSP (default false)", CommandOptionType.BoolValue);
app.Option("--sqlitefile", $"File name to an SQLite database file inside the data directory", CommandOptionType.SingleValue);
app.Option("--externalservices", $"Links added to external services inside Server Settings / Services under the format service1:path2;service2:path2.(default: empty)", CommandOptionType.SingleValue);
app.Option("--bundlejscss", $"Bundle JavaScript and CSS files for better performance (default: true)", CommandOptionType.SingleValue);
app.Option("--rootpath", "The root path in the URL to access BTCPay (default: /)", CommandOptionType.SingleValue);
app.Option("--sshconnection", "SSH server to manage BTCPay under the form user@server:port (default: root@externalhost or empty)", CommandOptionType.SingleValue);
app.Option("--sshpassword", "SSH password to manage BTCPay (default: empty)", CommandOptionType.SingleValue);

View File

@ -77,10 +77,7 @@ namespace BTCPayServer.Plugins.Shopify
return _cachedShopifyJavascript;
}
string[] fileList = _btcPayServerOptions.Value.BundleJsCss
? new[] { "bundles/shopify-bundle.min.js" }
: new[] { "modal/btcpay.js", "shopify/btcpay-shopify.js" };
string[] fileList = new[] { "modal/btcpay.js", "shopify/btcpay-shopify.js" };
foreach (var file in fileList)
{
@ -287,4 +284,3 @@ namespace BTCPayServer.Plugins.Shopify
}
}

View File

@ -6,7 +6,6 @@
"environmentVariables": {
"BTCPAY_NETWORK": "regtest",
"BTCPAY_LAUNCHSETTINGS": "true",
"BTCPAY_BUNDLEJSCSS": "false",
"BTCPAY_BTCLIGHTNING": "type=clightning;server=tcp://127.0.0.1:30993",
"BTCPAY_BTCEXTERNALLNDREST": "type=lnd-rest;server=http://lnd:lnd@127.0.0.1:35531/;allowinsecure=true",
"BTCPAY_BTCEXTERNALLNDSEEDBACKUP": "../BTCPayServer.Tests/TestData/LndSeedBackup/walletunlock.json",
@ -41,7 +40,6 @@
"BTCPAY_LAUNCHSETTINGS": "true",
"BTCPAY_PORT": "14142",
"BTCPAY_HttpsUseDefaultCertificate": "true",
"BTCPAY_BUNDLEJSCSS": "false",
"BTCPAY_VERBOSE": "true",
"BTCPAY_BTCLIGHTNING": "type=clightning;server=tcp://127.0.0.1:30993",
"BTCPAY_BTCEXTERNALLNDREST": "type=lnd-rest;server=http://lnd:lnd@127.0.0.1:35531/;allowinsecure=true",
@ -79,7 +77,6 @@
"BTCPAY_PORT": "14142",
"BTCPAY_HttpsUseDefaultCertificate": "true",
"BTCPAY_VERBOSE": "true",
"BTCPAY_BUNDLEJSCSS": "false",
"BTCPAY_LTCEXPLORERURL": "http://127.0.0.1:32838/",
"BTCPAY_LBTCEXPLORERURL": "http://127.0.0.1:32838/",
"BTCPAY_BTCLIGHTNING": "type=clightning;server=tcp://127.0.0.1:30993",

View File

@ -417,8 +417,6 @@
<script src="~/crowdfund/services/audioplayer.js" asp-append-version="true"></script>
<script src="~/crowdfund/services/fireworks.js" asp-append-version="true"></script>
<script src="~/crowdfund/services/listener.js" asp-append-version="true"></script>
@*We need to make sure btcpay.js is not bundled, else it will not work if there is a RootPath*@
<script src="~/modal/btcpay.js" asp-append-version="true"></script>
}
<partial name="LayoutFoot"/>

View File

@ -1,10 +1,7 @@
<script src="~/vendor/jquery/jquery.min.js" asp-append-version="true"></script>
<script src="~/vendor/jquery/jquery.min.js" asp-append-version="true"></script>
<script src="~/vendor/bootstrap/bootstrap.bundle.min.js" asp-append-version="true"></script>
<script src="~/vendor/moment/moment.min.js" asp-append-version="true"></script>
<script src="~/vendor/flatpickr/flatpickr.js" asp-append-version="true"></script>
<script src="~/js/copy-to-clipboard.js" asp-append-version="true"></script>
<script src="~/main/utils.js" asp-append-version="true"></script>
<script src="~/main/site.js" asp-append-version="true"></script>

View File

@ -24,13 +24,11 @@
<link href="~/checkout/css/vex-theme-btcpay.css" asp-append-version="true" rel="stylesheet" />
<link href="~/vendor/jquery-prettydropdowns/prettydropdowns.css" asp-append-version="true" rel="stylesheet" />
<script>
var initialSrvModel = @Safe.Json(Model);
</script>
<script src="~/vendor/jquery/jquery.min.js" asp-append-version="true"></script>
<script src="~/vendor/bootstrap/bootstrap.bundle.min.js" asp-append-version="true"></script>
<script src="~/vendor/clipboard.js/clipboard.js" asp-append-version="true"></script>
<script src="~/vendor/vuejs/vue.min.js" asp-append-version="true"></script>
<script src="~/vendor/vue-qrcode/vue-qrcode.min.js" asp-append-version="true"></script>

View File

@ -57,8 +57,6 @@
<script src="~/payment-request/app.js" asp-append-version="true"></script>
<script src="~/payment-request/helpers/math.js" asp-append-version="true"></script>
<script src="~/payment-request/services/listener.js" asp-append-version="true"></script>
@*We need to make sure btcpay.js is not bundled, else it will not work if there is a RootPath*@
<script src="~/modal/btcpay.js" asp-append-version="true"></script>
@Safe.Raw(Model.EmbeddedCSS)
<style>