mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
use colors for warning message in deprecated options
This commit is contained in:
12
js/app.js
12
js/app.js
@@ -79,7 +79,9 @@ var App = function() {
|
||||
};
|
||||
|
||||
var checkDeprecatedOptions = function(userConfig) {
|
||||
var deprecatedOptions = require(global.root_path + "/js/deprecated.js").configs;
|
||||
var deprecated = require(global.root_path + "/js/deprecated.js");
|
||||
var deprecatedOptions = deprecated.configs;
|
||||
|
||||
var usedDeprecated = [];
|
||||
|
||||
deprecatedOptions.forEach(function(option) {
|
||||
@@ -89,10 +91,10 @@ var App = function() {
|
||||
});
|
||||
|
||||
if (usedDeprecated.length > 0) {
|
||||
console.warn(
|
||||
"WARNING! Your config is using deprecated options: ",
|
||||
usedDeprecated.join(", "),
|
||||
". Check README and CHANGELOG for more up-to-date ways of getting the same functionality."
|
||||
console.warn(deprecated.colors.warn(
|
||||
"WARNING! Your config is using deprecated options: " +
|
||||
usedDeprecated.join(", ") +
|
||||
". Check README and CHANGELOG for more up-to-date ways of getting the same functionality.")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user