Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit 25fb3c5

Browse files
author
Explv
committed
Replace CDNs with npm packages
- Install jQuery, Bootstrap, Leaflet, Font Awesome, SweetAlert2 via npm - Create main.js entry point to import all dependencies - Remove all CDN links and fallback scripts from HTML - Move static assets to public/ folder for Vite - Update imports to use npm packages instead of CDNs
1 parent 6018a44 commit 25fb3c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+81
-41
lines changed

index.html

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -32,49 +32,10 @@
3232
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
3333
<meta name="theme-color" content="#ffffff">
3434

35-
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"
36-
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
37-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/leaflet.css" />
38-
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"
39-
integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
40-
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
41-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.33.1/sweetalert2.min.css"
42-
integrity="sha256-/PVkO2+mUlKqE6wgKVXU5Wh4mx3vncHAxLEdpXrziGo=" crossorigin="anonymous" />
43-
4435
<link rel="stylesheet" href="/css/main.css">
4536

46-
<!-- Get jQuery JS from Google CDN, or fallback to local copy -->
47-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
48-
<script type="text/javascript">
49-
window.jQuery || document.write('<script type="text/javascript" src="js/external/jquery-3.2.1.min.js\"><\/script>');
50-
</script>
51-
52-
<!-- Get jQuery UI JS from Google CDN, or fallback to local copy -->
53-
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
54-
<script type="text/javascript">
55-
window.jQuery.ui || document.write('<script type="text/javascript" src="js/external/jquery-ui.min.js\"><\/script>');
56-
</script>
57-
58-
<!-- Get Bootstrap JS from Bootstrap CDN, or fallback to local copy -->
59-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
60-
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
61-
crossorigin="anonymous"></script>
62-
<script>
63-
window.jQuery.fn.modal || document.write('<script type="text/javascript" src="js/external/bootstrap.min.js\"><\/script>');
64-
</script>
65-
66-
<!-- Get Leaflet JS from CDNJS, or fallback to local copy -->
67-
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/leaflet.js"
68-
integrity="sha256-kdEnCVOWosn3TNsGslxB8ffuKdrZoGQdIdPwh7W1CsE=" crossorigin="anonymous"></script>
69-
<script>
70-
window.L || document.write('<script type="text/javascript" src="js/external/leaflet.js\"><\/script>');
71-
</script>
72-
73-
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.33.1/sweetalert2.js"
74-
integrity="sha256-u74zWXS2T+G4E4NsM/R8gR8SaTJcq5a0TCks5m+AN9k=" crossorigin="anonymous"></script>
75-
76-
<!-- Try to load main JS module -->
77-
<script type="module" src="/js/map.js"></script>
37+
<!-- Main application entry point -->
38+
<script type="module" src="/src/main.js"></script>
7839
</head>
7940

8041
<body>

package-lock.json

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,13 @@
1616
"devDependencies": {
1717
"@vitejs/plugin-legacy": "^7.1.0",
1818
"vite": "^7.0.6"
19+
},
20+
"dependencies": {
21+
"bootstrap": "^3.4.1",
22+
"font-awesome": "^4.7.0",
23+
"jquery": "^3.2.1",
24+
"jquery-ui": "^1.12.1",
25+
"leaflet": "^1.2.0",
26+
"sweetalert2": "^7.33.1"
1927
}
2028
}
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.

0 commit comments

Comments
 (0)