Skip to content

Commit

Permalink
Migrate to Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
weeman1337 committed Oct 2, 2023
1 parent 9c41acb commit d9a0687
Show file tree
Hide file tree
Showing 62 changed files with 7,583 additions and 4,369 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-meshviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm audit
- run: npm run gulp-ci
- run: npm lint
- run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/release-meshviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run gulp
- run: npm run build
- run: "cd build; zip -r ../meshviewer-build.zip .; cd .."
- name: Create Release
id: create_release
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions assets/icons/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ $cache-breaker: unique-id();
font-style: normal;
font-weight: normal;
src:
url("fonts/meshviewer.woff2?rel=#{$cache-breaker}") format("woff2"),
url("fonts/meshviewer.woff?rel=#{$cache-breaker}") format("woff"),
url("fonts/meshviewer.ttf?rel=#{$cache-breaker}") format("truetype");
url("@fonts/meshviewer.woff2?rel=#{$cache-breaker}") format("woff2"),
url("@fonts/meshviewer.woff?rel=#{$cache-breaker}") format("woff"),
url("@fonts/meshviewer.ttf?rel=#{$cache-breaker}") format("truetype");
}

[class^="ion-"],
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ gulp.task(
gulp.task(
"ci",
gulp.series(
gulp.parallel(getTask("eslint-fail")),
gulp.parallel(getTask("eslint-fail"), getTask("sasslint")),
gulp.parallel(getTask("copy"), getTask("javascript"), getTask("sass"), getTask("jsonMinify")),
getTask("html"),
getTask("clean"),
Expand All @@ -41,7 +41,7 @@ gulp.task(
gulp.task(
"default",
gulp.series(
gulp.parallel(getTask("eslint")),
gulp.parallel(getTask("eslint"), getTask("sasslint")),
gulp.parallel(getTask("copy"), getTask("javascript"), getTask("sass"), getTask("jsonMinify")),
getTask("html"),
getTask("clean"),
Expand Down
10 changes: 2 additions & 8 deletions html/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,14 @@
<meta name="og:site_name" content="Meshviewer" />
<meta name="og:type" content="website" />

<link rel="stylesheet" href="main.css" inline />
<link rel="stylesheet" class="css-mode night" media="not" href="night.css" inline />
<title>Meshviewer - loading...</title>
<!-- inject:config -->
<!-- contents of html partials will be injected here -->
<!-- endinject -->
<script src="vendor/polyfill.js" inline></script>
<script src="app.js" inline></script>
<script src="main.js" type="module"></script>
</head>
<body>
<div class="loader">
<p>
Lade<br />
<img inline src="logo.svg" class="spinner" alt="Loading ..." />
<img src="assets/logo.svg" class="spinner" alt="Loading ..." />
<br />
Karten &amp; Knoten...
</p>
Expand Down
114 changes: 55 additions & 59 deletions lib/about.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,56 @@
define(function () {
"use strict";

return function () {
this.render = function render(d) {
d.innerHTML =
_.t("sidebar.aboutInfo") +
"<h4>" +
_.t("node.nodes") +
"</h4>" +
'<p class="legend">' +
'<span class="legend-new"><span class="symbol"></span> ' +
_.t("sidebar.nodeNew") +
"</span>" +
'<span class="legend-online"><span class="symbol"></span> ' +
_.t("sidebar.nodeOnline") +
"</span>" +
'<span class="legend-offline"><span class="symbol"></span> ' +
_.t("sidebar.nodeOffline") +
"</span>" +
'<span class="legend-uplink"><span class="symbol"></span> ' +
_.t("sidebar.nodeUplink") +
"</span>" +
"</p>" +
"<h4>" +
_.t("node.clients") +
"</h4>" +
'<p class="legend">' +
'<span class="legend-24ghz"><span class="symbol"></span> 2.4 GHz</span>' +
'<span class="legend-5ghz"><span class="symbol"></span> 5 GHz</span>' +
'<span class="legend-others"><span class="symbol"></span> ' +
_.t("others") +
"</span>" +
"</p>" +
"<h3>Feel free to contribute!</h3>" +
"<p>Please support this meshviewer-fork by opening issues or sending pull requests!</p>" +
'<p><a href="https://github.com/freifunk/meshviewer">' +
"https://github.com/freifunk/meshviewer</a></p>" +
'<p>Fork maintained by <a href="https://ffm.freifunk.net" target="_blank">Freifunk Frankfurt</a></p>' +
"<h3>AGPL 3</h3>" +
"<p>Copyright (C) Milan Pässler</p>" +
"<p>Copyright (C) Nils Schneider</p>" +
"<p>This program is free software: you can redistribute it and/or " +
"modify it under the terms of the GNU Affero General Public " +
"License as published by the Free Software Foundation, either " +
"version 3 of the License, or (at your option) any later version.</p>" +
"<p>This program is distributed in the hope that it will be useful, " +
"but WITHOUT ANY WARRANTY; without even the implied warranty of " +
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " +
"GNU Affero General Public License for more details.</p>" +
"<p>You should have received a copy of the GNU Affero General " +
"Public License along with this program. If not, see " +
'<a href="https://www.gnu.org/licenses/">' +
"https://www.gnu.org/licenses/</a>.</p>" +
"<p>The source code is available at " +
'<a href="https://github.com/freifunk/meshviewer">' +
"https://github.com/freifunk/meshviewer</a>.</p>";
};
export const About = function () {
this.render = function render(d) {
d.innerHTML =
_.t("sidebar.aboutInfo") +
"<h4>" +
_.t("node.nodes") +
"</h4>" +
'<p class="legend">' +
'<span class="legend-new"><span class="symbol"></span> ' +
_.t("sidebar.nodeNew") +
"</span>" +
'<span class="legend-online"><span class="symbol"></span> ' +
_.t("sidebar.nodeOnline") +
"</span>" +
'<span class="legend-offline"><span class="symbol"></span> ' +
_.t("sidebar.nodeOffline") +
"</span>" +
'<span class="legend-uplink"><span class="symbol"></span> ' +
_.t("sidebar.nodeUplink") +
"</span>" +
"</p>" +
"<h4>" +
_.t("node.clients") +
"</h4>" +
'<p class="legend">' +
'<span class="legend-24ghz"><span class="symbol"></span> 2.4 GHz</span>' +
'<span class="legend-5ghz"><span class="symbol"></span> 5 GHz</span>' +
'<span class="legend-others"><span class="symbol"></span> ' +
_.t("others") +
"</span>" +
"</p>" +
"<h3>Feel free to contribute!</h3>" +
"<p>Please support this meshviewer-fork by opening issues or sending pull requests!</p>" +
'<p><a href="https://github.com/freifunk/meshviewer">' +
"https://github.com/freifunk/meshviewer</a></p>" +
'<p>Fork maintained by <a href="https://ffm.freifunk.net" target="_blank">Freifunk Frankfurt</a></p>' +
"<h3>AGPL 3</h3>" +
"<p>Copyright (C) Milan Pässler</p>" +
"<p>Copyright (C) Nils Schneider</p>" +
"<p>This program is free software: you can redistribute it and/or " +
"modify it under the terms of the GNU Affero General Public " +
"License as published by the Free Software Foundation, either " +
"version 3 of the License, or (at your option) any later version.</p>" +
"<p>This program is distributed in the hope that it will be useful, " +
"but WITHOUT ANY WARRANTY; without even the implied warranty of " +
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " +
"GNU Affero General Public License for more details.</p>" +
"<p>You should have received a copy of the GNU Affero General " +
"Public License along with this program. If not, see " +
'<a href="https://www.gnu.org/licenses/">' +
"https://www.gnu.org/licenses/</a>.</p>" +
"<p>The source code is available at " +
'<a href="https://github.com/freifunk/meshviewer">' +
"https://github.com/freifunk/meshviewer</a>.</p>";
};
});
};
Loading

0 comments on commit d9a0687

Please sign in to comment.