mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2025-06-03 09:43:36 -07:00
Compare commits
6 commits
2ccd56ef36
...
563c47f1f6
Author | SHA1 | Date | |
---|---|---|---|
|
563c47f1f6 | ||
|
a9981b8852 | ||
|
516e78ceb9 | ||
|
5b6abc66e9 | ||
|
6a84961a36 | ||
|
07eed1bf3e |
9 changed files with 1378 additions and 101 deletions
4
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
|
@ -26,7 +26,7 @@ have aptly described your issue in words, feel free to ignore/delete this sectio
|
|||
**Please fill out the following information;**
|
||||
|
||||
- Node version: [This can be obtained by running `node -v` in your terminal]
|
||||
- Have you updated to the latest MagicMirror core? [yes/no]
|
||||
- Have you updated to the latest MagicMirror core? (yes/no)
|
||||
- Please post the relevant part of your config file here:
|
||||
|
||||
```json
|
||||
|
@ -35,7 +35,7 @@ have aptly described your issue in words, feel free to ignore/delete this sectio
|
|||
|
||||
- Please post any errors you see about MMM-pages in the console (Hit F12 > Console when the MagicMirror window is focused), or write **None** if there aren't any:
|
||||
|
||||
```
|
||||
```bash
|
||||
(Paste the error here)
|
||||
```
|
||||
|
||||
|
|
2
.github/workflows/automated-tests.yaml
vendored
2
.github/workflows/automated-tests.yaml
vendored
|
@ -23,4 +23,4 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Check linting
|
||||
run: npm run lint
|
||||
run: node --run lint
|
||||
|
|
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.1.1](https://github.com/edward-shen/MMM-pages/compare/v1.1.0...v1.1.1) - 2025-03-26 - Maintenance Release
|
||||
|
||||
### Changed
|
||||
|
||||
- chore: review ESLint config and add markdown linting
|
||||
- chore: update devDependencies
|
||||
- chore: use `node --run` instead of `npm run` to run scripts
|
||||
|
||||
## [1.1.0](https://github.com/edward-shen/MMM-pages/compare/v1.0.1...v1.1.0) - 2025-03-25 - Feature Release
|
||||
|
||||
### Added
|
||||
|
||||
- feat: Add individual rotation time for each page (#88)
|
||||
- docs: Add example configuration files in directory `example_configs`
|
||||
|
||||
## [1.0.1](https://github.com/edward-shen/MMM-pages/compare/v1.0.0...v1.0.1) - 2025-03-23 - Maintenance Release
|
||||
|
||||
### Changed
|
||||
|
|
12
README.md
12
README.md
|
@ -59,7 +59,7 @@ To use this module, add a configuration to the modules array in the `config/conf
|
|||
|
||||
There are two ways to configure this module: Using the module names or using class names. The module name based configuration is easier to use, but has the limitation that you can only use one instance of each module. So if you want to use multiple instances of the same module, you have to use the class based configuration.
|
||||
|
||||
*Note*: Some of the module names used in the following examples are fictitious.
|
||||
*Note*: You can find complete configuration example files for both module name and class based configurations in the [example_configs](example_configs) directory.
|
||||
|
||||
### Module name based configuration
|
||||
|
||||
|
@ -87,11 +87,11 @@ The first element of the array is the first page, the second element is the seco
|
|||
hiddenPages: { // modules that are only shown on specific pages
|
||||
"screenSaver": [
|
||||
"clock",
|
||||
"MMM-SomeBackgroundImageModule"
|
||||
"MMM-BackgroundSlideshow"
|
||||
],
|
||||
"admin": [
|
||||
"MMM-ShowMeSystemStatsModule",
|
||||
"MMM-AnOnScreenMenuModule"
|
||||
"MMM-SystemMonitor",
|
||||
"MMM-OnScreenMenu"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -285,8 +285,8 @@ See also FAQ below.
|
|||
If you want to contribute to this project, pleases use the following commands to maintain code quality:
|
||||
|
||||
- `npm install` - Install development dependencies for linting.
|
||||
- `npm run lint` - Run linting checks.
|
||||
- `npm run lint:fix` - Fix linting issues. Please run this before committing.
|
||||
- `node --run lint` - Run linting checks.
|
||||
- `node --run lint:fix` - Fix linting issues. Please run this before committing.
|
||||
|
||||
[mm]: https://github.com/MagicMirrorOrg/MagicMirror
|
||||
[page indicator]: https://github.com/edward-shen/MMM-page-indicator
|
||||
|
|
|
@ -1,27 +1,46 @@
|
|||
import eslintPluginJs from '@eslint/js';
|
||||
import eslintPluginStylistic from '@stylistic/eslint-plugin';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
import globals from 'globals';
|
||||
import js from '@eslint/js';
|
||||
import markdown from '@eslint/markdown';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
|
||||
const config = [
|
||||
eslintPluginJs.configs.recommended,
|
||||
eslintPluginStylistic.configs.recommended,
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ['**/*.js', '**/*.mjs'],
|
||||
files: ['**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
Log: 'readonly',
|
||||
MM: 'readonly',
|
||||
Module: 'readonly',
|
||||
module: 'readonly',
|
||||
},
|
||||
},
|
||||
plugins: { js, stylistic },
|
||||
extends: ['js/recommended', 'stylistic/recommended'],
|
||||
rules: {
|
||||
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
||||
'@stylistic/comma-dangle': ['error', 'only-multiline'],
|
||||
'@stylistic/max-statements-per-line': ['error', { max: 2 }],
|
||||
'@stylistic/semi': ['error', 'always'],
|
||||
'object-shorthand': ['error', 'always']
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.mjs'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
sourceType: 'module'
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
export default config;
|
||||
plugins: { js, stylistic },
|
||||
extends: ['js/recommended', 'stylistic/recommended'],
|
||||
rules: {
|
||||
'@stylistic/comma-dangle': ['error', 'only-multiline'],
|
||||
'@stylistic/semi': ['error', 'always'],
|
||||
}
|
||||
},
|
||||
{ files: ['**/*.md'], plugins: { markdown }, language: 'markdown/gfm', extends: ['markdown/recommended'] },
|
||||
]);
|
||||
|
|
60
example_configs/config_class-name.js
Normal file
60
example_configs/config_class-name.js
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* This is an example configuration file for the MMM-pages module.
|
||||
*
|
||||
* Since it uses only default modules besides MMM-pages, it is a good starting
|
||||
* point for your configuration. You can add more modules if you want.
|
||||
*
|
||||
* It shows how to configure the module with class names. Checkout the
|
||||
* "Class based configuration" section in the README.
|
||||
*
|
||||
*/
|
||||
|
||||
let config = {
|
||||
modules: [
|
||||
{
|
||||
module: 'MMM-pages',
|
||||
config: {
|
||||
timings: {
|
||||
default: 5000,
|
||||
2: 20000
|
||||
},
|
||||
modules: [
|
||||
['page0'],
|
||||
['page1'],
|
||||
['page2'],
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
module: 'compliments',
|
||||
classes: 'page0 page1 page2',
|
||||
position: 'top_bar',
|
||||
config: {
|
||||
compliments: {
|
||||
anytime: ['Test MMM-pages: Class based configuration'],
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
module: 'clock',
|
||||
classes: 'page1',
|
||||
position: 'bottom_bar'
|
||||
},
|
||||
{
|
||||
module: 'newsfeed',
|
||||
classes: 'page2',
|
||||
position: 'middle_center',
|
||||
config: {
|
||||
feeds: [
|
||||
{
|
||||
title: 'New York Times',
|
||||
url: 'https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
/** ************* DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== 'undefined') { module.exports = config; }
|
57
example_configs/config_module-name.js
Normal file
57
example_configs/config_module-name.js
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* This is an example configuration file for the MMM-pages module.
|
||||
*
|
||||
* Since it uses only default modules besides MMM-pages, it is a good starting
|
||||
* point for your configuration. You can add more modules if you want.
|
||||
*
|
||||
* It shows how to configure the module with module names. Checkout the
|
||||
* "Module name based configuration" section in the README.
|
||||
*
|
||||
*/
|
||||
|
||||
let config = {
|
||||
modules: [
|
||||
{
|
||||
module: 'MMM-pages',
|
||||
config: {
|
||||
timings: {
|
||||
default: 5000,
|
||||
2: 20000
|
||||
},
|
||||
modules: [
|
||||
['compliments'],
|
||||
['clock'],
|
||||
['newsfeed'],
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
module: 'compliments',
|
||||
position: 'top_bar',
|
||||
config: {
|
||||
compliments: {
|
||||
anytime: ['Test MMM-pages: Module name based configuration'],
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
module: 'clock',
|
||||
position: 'top_bar'
|
||||
},
|
||||
{
|
||||
module: 'newsfeed',
|
||||
position: 'middle_center',
|
||||
config: {
|
||||
feeds: [
|
||||
{
|
||||
title: 'New York Times',
|
||||
url: 'https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
/** ************* DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== 'undefined') { module.exports = config; }
|
1277
package-lock.json
generated
1277
package-lock.json
generated
File diff suppressed because it is too large
Load diff
11
package.json
11
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mmm-pages",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.1",
|
||||
"description": "Add pages to your MagicMirror².",
|
||||
"main": "MMM-pages.js",
|
||||
"repository": {
|
||||
|
@ -21,12 +21,13 @@
|
|||
"scripts": {
|
||||
"lint": "eslint",
|
||||
"lint:fix": "eslint --fix",
|
||||
"test": "npm run lint"
|
||||
"test": "node --run lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.23.0",
|
||||
"@eslint/js": "^9.27.0",
|
||||
"@eslint/markdown": "^6.4.0",
|
||||
"@stylistic/eslint-plugin": "^4.2.0",
|
||||
"eslint": "^9.23.0",
|
||||
"globals": "^16.0.0"
|
||||
"eslint": "^9.27.0",
|
||||
"globals": "^16.1.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue