Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ _This release is scheduled to be released on 2024-10-01._

### Added

- [core] Check config at every start of MagicMirror² (#3450)
- [core] Add spelling check (cspell): `npm run test:spelling` and handle spelling issues
- [core] removed `config.paths.vendor` (could not work because `vendor` is hardcoded in `index.html`), renamed `config.paths.modules` to `config.foreignModulesDir`, added variable `MM_CUSTOMCSS_FILE` which - if set - overrides `config.customCss`, added variable `MM_MODULES_DIR` which - if set - overrides `config.foreignModulesDir`
- [core] elements are now removed from index.html when loading script or stylesheet files fails
Expand Down
2 changes: 2 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ function App () {
}
}

require(`${global.root_path}/js/check_config.js`);

try {
fs.accessSync(configFilename, fs.F_OK);
const c = require(configFilename);
Expand Down
3 changes: 2 additions & 1 deletion js/check_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ function checkConfigFile () {
for (const error of errors) {
Log.error(`Line ${error.line} column ${error.column}: ${error.message}`);
}
return;
process.exit(1);
}

Log.info("Checking modules structure configuration... ");

const position_list = Utils.getModulePositions();

// Make Ajv schema configuration of modules config
// only scan "module" and "position"
const schema = {
Expand Down