Skip to content

Commit 1110865

Browse files
feat: add demo configuration file and add package.json script
1 parent a3ccd57 commit 1110865

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C
1414
## Developer commands
1515

1616
- `npm install` - Install all dependencies.
17+
- `node --run demo` - Start MagicMirror with demo config showcasing module features.
1718
- `node --run download_modules` - Download module list manually.
1819
- `node --run lint` - Run linting and formatter checks.
1920
- `node --run lint:fix` - Fix linting and formatter issues.

demo.config.js

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
let config = {
2+
address: "0.0.0.0",
3+
ipWhitelist: [],
4+
logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"],
5+
modules: [
6+
{
7+
module: "clock",
8+
position: "top_left",
9+
config: {
10+
displaySeconds: false,
11+
showPeriod: true,
12+
showDate: true
13+
}
14+
},
15+
{
16+
module: "weather",
17+
position: "top_right",
18+
config: {
19+
weatherProvider: "openmeteo",
20+
type: "current",
21+
location: "Berlin",
22+
locationID: "2950159",
23+
lat: 52.52,
24+
lon: 13.41
25+
}
26+
},
27+
{
28+
module: "weather",
29+
position: "top_right",
30+
config: {
31+
weatherProvider: "openmeteo",
32+
type: "forecast",
33+
location: "Berlin",
34+
locationID: "2950159",
35+
lat: 52.52,
36+
lon: 13.41
37+
}
38+
},
39+
{
40+
module: "calendar",
41+
position: "top_left",
42+
header: "Upcoming Events",
43+
config: {
44+
calendars: [
45+
{
46+
url: "https://calendar.google.com/calendar/ical/en.german%23holiday%40group.v.calendar.google.com/public/basic.ics",
47+
symbol: "calendar"
48+
}
49+
]
50+
}
51+
},
52+
{
53+
module: "newsfeed",
54+
position: "bottom_bar",
55+
config: {
56+
feeds: [
57+
{
58+
title: "New York Times",
59+
url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
60+
}
61+
],
62+
showSourceTitle: true,
63+
showPublishDate: true,
64+
updateInterval: 300_000
65+
}
66+
},
67+
{
68+
module: "compliments",
69+
position: "lower_third",
70+
config: {
71+
compliments: {
72+
morning: [
73+
"Good morning!",
74+
"Have a great day!",
75+
"You look great today!"
76+
],
77+
afternoon: [
78+
"Hello!",
79+
"You look nice!",
80+
"Looking good today!"
81+
],
82+
evening: [
83+
"Good evening!",
84+
"Have a nice evening!",
85+
"You look relaxed!"
86+
]
87+
}
88+
}
89+
},
90+
{
91+
module: "MMM-Remote-Control",
92+
config: {
93+
secureEndpoints: false,
94+
classes: {
95+
"Toggle Weather": {
96+
toggle: ["weather"]
97+
},
98+
"Toggle Calendar": {
99+
toggle: ["calendar"]
100+
},
101+
"Toggle News": {
102+
toggle: ["newsfeed"]
103+
},
104+
"Night Mode": {
105+
hide: ["weather", "calendar", "newsfeed", "compliments"]
106+
},
107+
"Morning Mode": {
108+
show: ["clock", "weather", "calendar", "compliments"],
109+
hide: ["newsfeed"]
110+
}
111+
}
112+
}
113+
}
114+
]
115+
};
116+
117+
/** ************* DO NOT EDIT THE LINE BELOW */
118+
if (typeof module !== "undefined") {
119+
module.exports = config;
120+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
],
2525
"type": "commonjs",
2626
"scripts": {
27+
"demo": "cd ../../ && MM_CONFIG_FILE=modules/MMM-Remote-Control/demo.config.js node --run start:wayland:dev",
2728
"download_modules": "node ./scripts/download_modules_manually.mjs",
2829
"lint": "eslint && prettier . --check",
2930
"lint:fix": "eslint --fix && prettier . --write",

0 commit comments

Comments
 (0)