Skip to content

Commit 269eaa0

Browse files
committed
remove fonts dir
1 parent e26aed9 commit 269eaa0

10 files changed

Lines changed: 122 additions & 183 deletions

File tree

.github/dependabot.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,3 @@ updates:
2828
- "Skip Changelog"
2929
- "dependencies"
3030
- "javascript"
31-
32-
- package-ecosystem: "npm"
33-
directory: "/fonts"
34-
schedule:
35-
interval: "monthly"
36-
target-branch: "develop"
37-
labels:
38-
- "Skip Changelog"
39-
- "dependencies"
40-
- "javascript"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ coverage
1010
.lock-wscript
1111
build/Release
1212
/node_modules/**/*
13-
fonts/node_modules/**/*
1413
vendor/node_modules/**/*
1514
!/tests/node_modules/**/*
1615
jspm_modules
@@ -67,6 +66,7 @@ Temporary Items
6766
/css/*
6867
!/css/custom.css.sample
6968
!/css/main.css
69+
!/css/roboto.css
7070

7171
# Ignore users config file but keep the sample.
7272
/config/*

cspell.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,6 @@
244244
"Ybbet",
245245
"yearmatchgroup"
246246
],
247-
"ignorePaths": ["node_modules/**", "modules/**", "vendor/node_modules/**", "translations/**", "tests/mocks/**", "tests/e2e/modules/clock_es_spec.js", "fonts/roboto.css"],
247+
"ignorePaths": ["node_modules/**", "modules/**", "vendor/node_modules/**", "translations/**", "tests/mocks/**", "tests/e2e/modules/clock_es_spec.js", "css/roboto.css"],
248248
"dictionaries": ["node"]
249249
}

fonts/roboto.css renamed to css/roboto.css

Lines changed: 112 additions & 112 deletions
Large diffs are not rendered by default.

fonts/package-lock.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

fonts/package.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<link rel="icon" href="data:;base64,iVBORw0KGgo=" />
1414
<link rel="stylesheet" type="text/css" href="css/main.css" />
15-
<link rel="stylesheet" type="text/css" href="fonts/roboto.css" />
15+
<link rel="stylesheet" type="text/css" href="css/roboto.css" />
1616
<link rel="stylesheet" type="text/css" href="vendor/node_modules/animate.css/animate.min.css" />
1717
<!-- custom.css is loaded by the loader.js to make sure it's loaded after the module css files. -->
1818

js/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function Server (config) {
7272
app.use(helmet(config.httpHeaders));
7373
app.use("/js", express.static(__dirname));
7474

75-
let directories = ["/config", "/css", "/fonts", "/modules", "/vendor", "/translations", "/tests/configs", "/tests/mocks"];
75+
let directories = ["/config", "/css", "/node_modules/@fontsource", "/modules", "/vendor", "/translations", "/tests/configs", "/tests/mocks"];
7676
for (const directory of directories) {
7777
app.use(directory, express.static(path.resolve(global.root_path + directory)));
7878
}

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@
2525
"main": "js/electron.js",
2626
"scripts": {
2727
"config:check": "node js/check_config.js",
28-
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
2928
"install-mm": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev",
3029
"install-mm:dev": "npm install --no-audit --no-fund --no-update-notifier",
3130
"install-vendor": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
32-
"lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --fix",
31+
"lint:css": "stylelint 'css/main.css' 'css/roboto.css' 'modules/default/**/*.css' 'vendor/*.css' --fix",
3332
"lint:js": "eslint --fix",
3433
"lint:markdown": "markdownlint-cli2 . --fix",
3534
"lint:prettier": "prettier . --write",
36-
"postinstall": "node --run install-vendor && node --run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
35+
"postinstall": "node --run install-vendor && echo \"MagicMirror² installation finished successfully! \n\"",
3736
"prepare": "[ -f node_modules/.bin/husky ] && husky || echo no husky installed.",
3837
"server": "node ./serveronly",
3938
"start": "node --run start:x11",
@@ -47,7 +46,7 @@
4746
"test": "NODE_ENV=test jest -i --forceExit",
4847
"test:calendar": "node ./modules/default/calendar/debug.js",
4948
"test:coverage": "NODE_ENV=test jest --coverage -i --verbose false --forceExit",
50-
"test:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css'",
49+
"test:css": "stylelint 'css/main.css' 'css/roboto.css' 'modules/default/**/*.css' 'vendor/*.css'",
5150
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit",
5251
"test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
5352
"test:js": "eslint",
@@ -62,6 +61,8 @@
6261
"*.css": "stylelint --fix"
6362
},
6463
"dependencies": {
64+
"@fontsource/roboto": "^5.2.5",
65+
"@fontsource/roboto-condensed": "^5.2.5",
6566
"ajv": "^8.17.1",
6667
"console-stamp": "^3.1.2",
6768
"envsub": "^4.1.0",

tests/e2e/fonts_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const helpers = require("./helpers/global-setup");
33
describe("All font files from roboto.css should be downloadable", () => {
44
const fontFiles = [];
55
// Statements below filters out all 'url' lines in the CSS file
6-
const fileContent = require("node:fs").readFileSync(`${__dirname}/../../fonts/roboto.css`, "utf8");
6+
const fileContent = require("node:fs").readFileSync(`${__dirname}/../../css/roboto.css`, "utf8");
77
const regex = /\burl\(['"]([^'"]+)['"]\)/g;
88
let match = regex.exec(fileContent);
99
while (match !== null) {

0 commit comments

Comments
 (0)