mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #745 from roramirez/mv-colors-utils
Move colors in utils file
This commit is contained in:
commit
bd0de83d31
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var Server = require(__dirname + "/server.js");
|
var Server = require(__dirname + "/server.js");
|
||||||
|
var Utils = require(__dirname + "/utils.js");
|
||||||
var defaultModules = require(__dirname + "/../modules/default/defaultmodules.js");
|
var defaultModules = require(__dirname + "/../modules/default/defaultmodules.js");
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
|
|
||||||
@ -90,9 +91,8 @@ var App = function() {
|
|||||||
usedDeprecated.push(option);
|
usedDeprecated.push(option);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (usedDeprecated.length > 0) {
|
if (usedDeprecated.length > 0) {
|
||||||
console.warn(deprecated.colors.warn(
|
console.warn(Utils.colors.warn(
|
||||||
"WARNING! Your config is using deprecated options: " +
|
"WARNING! Your config is using deprecated options: " +
|
||||||
usedDeprecated.join(", ") +
|
usedDeprecated.join(", ") +
|
||||||
". Check README and CHANGELOG for more up-to-date ways of getting the same functionality.")
|
". Check README and CHANGELOG for more up-to-date ways of getting the same functionality.")
|
||||||
|
@ -5,12 +5,9 @@
|
|||||||
*
|
*
|
||||||
* Olex S. original idea this deprecated option
|
* Olex S. original idea this deprecated option
|
||||||
*/
|
*/
|
||||||
var colors = require("colors/safe");
|
|
||||||
colors.setTheme({warn: "yellow"})
|
|
||||||
|
|
||||||
var deprecated = {
|
var deprecated = {
|
||||||
configs: ["kioskmode"],
|
configs: ["kioskmode"],
|
||||||
colors: colors
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
17
js/utils.js
Normal file
17
js/utils.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* exported Utils */
|
||||||
|
/* Magic Mirror
|
||||||
|
* Utils
|
||||||
|
*
|
||||||
|
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||||
|
* MIT Licensed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var colors = require("colors/safe");
|
||||||
|
|
||||||
|
var Utils = {
|
||||||
|
colors: {
|
||||||
|
warn: colors.yellow
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof module !== "undefined") {module.exports = Utils;}
|
Loading…
x
Reference in New Issue
Block a user