Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
refactor: debundle client; move stuff around
Browse files Browse the repository at this point in the history
  • Loading branch information
leia-uwu committed Feb 19, 2024
1 parent 0f1c5da commit 4b291f4
Show file tree
Hide file tree
Showing 1,987 changed files with 94,127 additions and 529 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Public directories
client/
client/public/
reference/

# Compiled source
dist/
node_modules/
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"@typescript-eslint"
],
"rules": {
"eqeqeq": 0,
"no-mixed-operators": 0,
"@typescript-eslint/indent": [1, 4, { "SwitchCase": 0 }],
"@typescript-eslint/semi": [2, "always"],
"@typescript-eslint/quotes": [1, "double", { "avoidEscape": true }],
Expand Down
48 changes: 11 additions & 37 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,6 @@
<link rel="canonical" href="http://surviv.io" />
<link rel="apple-touch-icon-precomposed" href="img/icon_app.png">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- <script>
window.adsBlocked = false;
window.adBlockDetected = function() { window.adsBlocked = true; }
window.alert = function() { }
/* Cookie consent */
var cfg = {};
var consented = true;
var webview = false;
try {
cfg = JSON.parse(localStorage.getItem('surviv_config')) || {};
if (cfg.cookiesConsented != undefined) { consented = cfg.cookiesConsented; }
webview = localStorage.getItem('surviv_webview');
} catch (e) { }
window.cookiesConsented = consented;
if (window.cookiesConsented) {
document.write("<script async src='https://www.googletagmanager.com/gtag/js?id=UA-108811301-1' onerror='adBlockDetected();'>\x3C/script>");
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-108811301-1', { 'anonymize_ip': true });
}
window.webviewDetected = new RegExp("[?&]webview=true","gi").test(window.location.href) || webview;
</script>
<script>
document.write("<script async src='//api.adinplay.com/libs/aiptag/pub/SRV/surviv.io/tag.min.js'>\x3C/script>");
var aiptag = aiptag || {};
aiptag.gdprConsent = window.cookiesConsented;
aiptag.consented = window.cookiesConsented;
aiptag.cmd = aiptag.cmd || [];
aiptag.cmd.display = aiptag.cmd.display || [];
</script> -->
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
Expand Down Expand Up @@ -1352,7 +1320,7 @@ <h2 data-l10n='index-settings'>Settings</h2>
<div class='modal-content modal-close'>
<div class='modal-header'>
<span class='close close-hamburger icon-hamburger'></span>
<h2>&nbsp</h2>
<h2>&nbsp;</h2>
</div>
<div id='modal-hamburger-body' class='modal-body'>
<div id='modal-hamburger-leaderboards'>
Expand Down Expand Up @@ -1454,10 +1422,12 @@ <h3 class='close close-footer'><div class='btn-cookies-close btn-darken'>Got it!
</div>
</div>
</div>
<script type="text/javascript" src="js/manifest.7619645b.js"></script>
<script type="text/javascript" src="js/vendor.bd0cb293.js"></script>
<script type="text/javascript" src="js/app.js"></script></body>
<script>
<script>

// this is to make pixi v4 work with vite
window.global = window;

// make loadouts work
function setCookie(cname, cvalue, exdays) {
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
Expand All @@ -1466,4 +1436,8 @@ <h3 class='close close-footer'><div class='btn-cookies-close btn-darken'>Got it!
}
setCookie("app-data", "1", 3650);
</script>
<!-- <script type="text/javascript" src="js/manifest.7619645b.js"></script> -->
<!-- <script type="text/javascript" src="js/vendor.bd0cb293.js"></script> -->
<!-- <script type="text/javascript" src="js/app.js"></script></body> -->
<script type="module" src="src/main.js"></script>
</html>
19 changes: 19 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"private": true,
"scripts": {
"build": "vite build",
"dev": "vite dev",
"preview": "vite preview"
},
"dependencies": {
"base64-js": "^1.5.1",
"bit-buffer": "^0.2.5",
"jquery": "^3.7.1",
"pixi.js": "4.8.9"
},
"devDependencies": {
"@types/jquery": "^3.5.29",
"vite": "^5.1.3",
"@types/pixi.js": "4.8.9"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4b291f4

Please sign in to comment.